Q. What will be output for the following code?

Code:
#include <stdio.h>
int main(int argc, char *argv[])
{
    while (*argv  !=  NULL)
        printf(""%s
"", *(argv++));
    return 0;
}
  • (A) Depends on the compiler
  • (B) Depends on the platform
  • (C) Segmentation fault/code crash
  • (D) ./a.out
πŸ’¬ Discuss
βœ… Correct Answer: (D) ./a.out

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

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