πŸ“Š C Programming
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
πŸ’¬ Discuss
βœ… Correct Answer: (C) Segmentation fault/code crash

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
358
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Ram Sharma
Publisher
πŸ“ˆ
97%
Success Rate