Input & Output


  1. What will be the output of the following C code (when 10 and 20 are entered)?
    #include <stdio.h>
    void main()
    {
    int n1, n2;
    printf("Enter Numbers: ");
    scanf("%d", &n2);
    scanf("%d", &n1);
    printf("%d\t%d\n", n2, n1);
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: E

    10 20


  1. Which of the following is an invalid method for input?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: E

    None of these



  1. Which of the following doesn’t require an & for the input in scanf()?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    char name[15];


  1. If the conversion characters of int d, i, o, u and x are preceded by h, it indicates?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    A pointer to short



  1. Which of the following is NOT a delimiter for an input in scanf?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: E

    None of these