print name in c code example
Example 1: print variable c
printf("%d\n", x);
Example 2: print name of file argv c
int main(int argc, char *argv[])
{
int i;
for (i=0; i<argc; ++i)
{
printf("%s\n", argv[i]);
}
}
printf("%d\n", x);
int main(int argc, char *argv[])
{
int i;
for (i=0; i<argc; ++i)
{
printf("%s\n", argv[i]);
}
}