Home » C Programming » Command Line Arguments » Question
  1. What will be the output of the following C code (run without any command line arguments)?
     #include <stdio.h>
    int main(int argc, char *argv[])
    {
    while (argv != NULL)
    printf("%s\n", *(argv++));
    return 0;
    }
    1. Executable file name
    2. Depends on the platform
    3. Depends on the compiler
    4. Segmentation fault/code crash
    5. None of these
Correct Option: D

Segmentation fault/code crash



Your comments will be displayed only after manual approval.