#include<stdio.h>
int main(int argc, char * argv[])
{
int i;
if(argc==1)
{
printf("You need to enter your name");
exit(1);
}
for(i=1;i<argc;i++)
{
printf("%s",argv[i]);
}
return 0;
}
OUTPUT: programName XYZ ↵ (enter)
XYZ
int main(int argc, char * argv[])
{
int i;
if(argc==1)
{
printf("You need to enter your name");
exit(1);
}
for(i=1;i<argc;i++)
{
printf("%s",argv[i]);
}
return 0;
}
OUTPUT: programName XYZ ↵ (enter)
XYZ
1 Comments
what will be the output
ReplyDelete