Top

Discussion

Which of the following gives the name of the program if the second parameter to the main fucntion is char **argv?

  • A.argv[3]
  • B.argv[1]
  • C.argv[0]
  • D.argv[2]

Answer: C

The first string in the list of command line arguments represents the name of the program which can be accessed by using argv[0].

No comment is present. Be the first to comment.
Loading…

Post your comment