A

Admin • 833K Points
Coach

Q. What will be output for the following code?

Code:
#include <stdio.h>
int main(int argc, char *argv[])
{
printf(""%s
"", argv[-1]);
return 0;
}
  • (A) -1
  • (B) ./a.out
  • (C) Segmentation fault/code crash
  • (D) Depends on the compiler
  • Correct Answer - Option(C)
  • Views: 24
  • Filed under category C Programming
  • Hashtags:

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.