/*A PROGRAM TO ENTER VALUE FROM COMMAND LINE & CONVERT STRING TO INT VALUE & APPLY OPERATION ON THAT FORMULA..*/
#include<stdio.h>
int main(int argc,char* argv[])//ENTER THE ARGUMENTS FROM COMMAND...//int argc GIVES U COUNT OF NO. OF ARGUMENTS..& char* argv[] IS ARRAY OF POINTER WILL ALLOW U TO ENTER THE NUMBER OF STRINGS FROM COMMAND LINE..//
{
int a,b,c,d;
printf("argv[1]=%s",argv[1]);//PRINT ENTERED ARGUMENT WITH %s...*argv[0] is name of EXECUTING FILE ITSELF..
printf("argv[2]=%s\n",argv[2]);//
//argv[1]="2",argv[2]="4";
sscanf(argv[1],"%d",&a);//CONVERT THAT STRING INTO INT VALUE LIKE THIS//
sscanf(argv[2],"%d",&b);
sscanf(argv[3],"%d",&c);
printf("a=%d b=%d c=%d\n",a,b,c);
d=a*(b+c);//NOW APPLY OPERATION ON THAT INT VALUE//
printf("result=%d\n",d);//PRINT THE RESULT AFTER APPLYING OPERATION//