main(argc, argv)                   	/* line 1 */ 
int argc;                        	/* line 2 */ 
char *argv[];                   	/* line 3 */ 
{                             	/* line 4 */ 
  int c=0;                    	/* line 5 */ 
                             	/* line 6 */ 
    if(atoi(argv[1]) < 3){        	/* line 7 */ 
      printf("Got less than 3\n");  	/* line 8 */ 
      if(atoi(argv[2]) > 5)         	/* line 9 */ 
        c = 2;                      	/* line 10 */ 
    }                               	/* line 11 */ 
    else                            	/* line 12 */ 
      printf("Got more than 3\n");  	/* line 13 */ 
   exit(0);                         	/* line 14 */ 
}                                   	/* line 15 */

Example 1: The test1.c program.

Back to Article