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[])
    {
    printf("%s\n", argv[argc]);
    return 0;
    }
    1. Depends on compiler
    2. Compilation Error
    3. Executable file name
    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.