Sunday 19 August 2012

Addition of number using cla (command line arguments) | c program

 Addition of number using cla (command line arguments)
/*C Program to add numbers using command line arguments(CLA)*/
void main(int argc,char *argv[])

{

int sum=0,i;


//Compare if proper number of arguments have been entered

if(argc<3)

{

printf("Insufficient number of arguments:\n");

getch();

return 0;

}


//Add all the numbers entered using atoi function

for(i=1;i<argc;i++)
print="" the="" sum="" ans="%d",sum);" h="">
Share This
Previous Post
Next Post

FYJC XI standard online admisson Process and declaraton of Merit list . Cut off List For prevous year also . 10 Th Results onlne declaraton Maharashtra Region .

0 comments: