Variables


  1. Which of the following is an external variable in the following C code?
     #include <stdio.h>
    int function(int p)
    {
    int q;
    return q;
    }
    int main()
    {
    int r;
    function(r);
    }
    int s;











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    s


  1. Global variables are ____________.











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    External



  1. Functions in C are always _________.











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    External


  1. What will be the output of the following C code?
    #include <stdio.h>
    int n = 15;
    void main()
    {
    int n = 5;
    printf("%d ", n);
    {
    int n = 10;
    }
    printf("%d", n);
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: E

    5 5



  1. What will be the output of the following C code?
    #include <stdio.h>
    int num = 10;
    void main()
    {
    int num = 5;
    printf("%d ", num);
    {
    num = 6;
    }
    printf("%d", num);
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    5 6