Program:
//disp.c
#include<stdio.h> //print all values passed by commandline arguments
#include<conio.h> //TESTED
int main(int args,char *argv[])
{
for(int i=0;i<args;i++)
printf("\n%s",argv[i]);
getch();
return 0;
}
Output:
disp.c Hai hello
Hai
hello
//disp.c
#include<stdio.h> //print all values passed by commandline arguments
#include<conio.h> //TESTED
int main(int args,char *argv[])
{
for(int i=0;i<args;i++)
printf("\n%s",argv[i]);
getch();
return 0;
}
Output:
disp.c Hai hello
Hai
hello
No comments:
Post a Comment