Users Online
· Guests Online: 156
· Members Online: 0
· Total Members: 188
· Newest Member: meenachowdary055
· Members Online: 0
· Total Members: 188
· Newest Member: meenachowdary055
Forum Threads
Newest Threads
No Threads created
Hottest Threads
No Threads created
Latest Articles
Articles Hierarchy
51 C Program to Print the Program Name and All its Arguments
This C Program Prints the Program Name and All its Arguments.
Here is source code of the C Program to Print the Program Name and All its Arguments. The C program is successfully compiled and run on a Linux system. The program output is also shown below.
/*
* C Program to Print the Program Name and All its Arguments
*/
#include <stdio.h>
void main(int argc, char *argv[]) /* command line Arguments */
{
int i;
for (i = 0;i < argc;i++)
{
printf("%s ", argv[i]); /* Printing the string */
}
printf("\n");
}
$ cc arg9.c
$ a.out this is c class by sanfoundry
a.out this is c class by sanfoundry
Here is source code of the C Program to Print the Program Name and All its Arguments. The C program is successfully compiled and run on a Linux system. The program output is also shown below.
/*
* C Program to Print the Program Name and All its Arguments
*/
#include <stdio.h>
void main(int argc, char *argv[]) /* command line Arguments */
{
int i;
for (i = 0;i < argc;i++)
{
printf("%s ", argv[i]); /* Printing the string */
}
printf("\n");
}
$ cc arg9.c
$ a.out this is c class by sanfoundry
a.out this is c class by sanfoundry
Comments
No Comments have been Posted.
Post Comment
Please Login to Post a Comment.