C Programming - Command Line Arguments - Discussion

Discussion Forum : Command Line Arguments - Yes / No Questions (Q.No. 2)
2.
If the different command line arguments are supplied at different times would the output of the following program change?
#include<stdio.h>

int main(int argc, char **argv)
{
    printf("%d\n", argv[argc]);
    return 0;
}
Yes
No
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
25 comments Page 2 of 3.

Karthi said:   1 decade ago
Thank you somuch sundar. Its clear now.

Deepika said:   1 decade ago
Anyone please help me. How is it works?

Mohit said:   5 years ago
Is "&" a pointer variable in c?

Arun said:   1 decade ago
Good explanation sundar keep going.

Hema said:   7 years ago
Nice explanation Thanks @Sundar.

Manai said:   6 years ago
Nice explanations, Thanks All.

Adarsh said:   1 decade ago
Nice explanation.

@sundar.

Jessie said:   1 decade ago
Thank you sundar;keep it up

Parag said:   1 decade ago
@Sundar

Nice ans. Thanks.

DEepika said:   1 decade ago
Excellent Sundar.. :)


Post your comments here:

Your comments will be displayed after verification.