Input & Output


  1. What will be the output of the following C code?
    #include <stdio.h>
    int main()
    {
    char *str = "Interview";
    int n = 30;
    printf("%*s", n, str);
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    Interview(note: spaces to the left of Interview)


  1. What will be the output of the following C code?
    #include <stdio.h>
    int main(int argc, char** argv)
    {
    char *str = "Interveiw";
    int n = 3;
    printf("%10.*s", n, str);
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    Int(note:6 spaces after Int)



  1. What will be the output of the following C code?
    #include 
    int main()
    {
    int n = 15, m = 8;
    printf("%d\n", printf("%d %d ", n, m));
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    15 8 5


  1. The statement prog < infile causes _________











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    prog to read characters from infile



  1. What is the value of EOF?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    -1