Command Line Arguments


  1. What is the second argument in command line arguments?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    A pointer to an array of character strings that contain the arguments, one per string


  1. What is the first argument in command line arguments?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    The number of command-line arguments the program was invoked with;



  1. What will be the output of the following C statement? (assuming the input is “Welcome to Interview mania”)
    printf(“%s\n”, argv[argc]);











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    (null)


  1. What type of array is generally generated in Command-line argument?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    Jagged Array



  1. In linux, argv[0] by command-line argument can be occupied by _________.











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    In linux, argv[0] by command-line argument can be occupied by ./test, ./fun.out.out and ./a.out