Variables


  1. Array sizes are optional during array declaration by using ______ keyword.











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    extern


  1. What will be the sequence of allocation and deletion of variables in the following C code?
    #include <stdio.h>
    int main()
    {
    int num;
    {
    int var;
    }
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    num->var, var->num



  1. Comment on the following 2 C Example programs.
    #include <stdio.h> //Example 1
    int main()
    {
    int p;
    int q;
    int r;
    }

    #include <stdio.h> //Example 2
    int main()
    {
    int p;
    {
    int q;
    }
    {
    int r;
    }
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    None of these


  1. Which variable has the longest scope in the following C code?
    #include <stdio.h>
    int p;
    int main()
    {
    int q;
    return 0;
    }
    int r;











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    p



  1. Comment on the output of the following C code.
    #include <stdio.h>
    int main()
    {
    int k;
    for (k = 0; k < 10; k++)
    int m = k;
    printf("%d", m);
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    Syntax error in declaration of m