Sail E0 Webinar

MCQs

Total Questions : 86 | Page 7 of 9 pages
Question 61. Automatic variables are stored in:
  1.    stack
  2.    data segment
  3.    register
  4.    heap
 Discuss Question
Answer: Option A. -> stack


None.


Question 62. The variable declaration with no storage class specified is by default:
  1.    auto
  2.    extern
  3.    static
  4.    register
 Discuss Question
Answer: Option A. -> auto


None.


Question 63. What is the output of this C code?    int x;    void main()    {        printf("%d", x);    }
  1.    Junk value
  2.    Run time error
  3.    0
  4.    Undefined
 Discuss Question
Answer: Option C. -> 0


None.


Question 64. Which of the following storage class supports char data type?
  1.    register
  2.    static
  3.    auto
  4.    All of the mentioned
 Discuss Question
Answer: Option D. -> All of the mentioned


None.


Question 65. Automatic variables are initialized to?
  1.    0
  2.    Junk value
  3.    Nothing
  4.    Both (a) & (b)
 Discuss Question
Answer: Option B. -> Junk value


None.


Question 66. What is the output of this C code?    void main()    {        int x;    } here x is?
  1.    automatic variable
  2.    static variable
  3.    global variable
  4.    register variable
 Discuss Question
Answer: Option A. -> automatic variable


None.


Question 67. What is the output of this C code?    void main()    {        static int x;        if (x++ < 2)        main();    }
  1.    Infinite calls to main
  2.    Run time error
  3.    Varies
  4.    main is called twice
 Discuss Question
Answer: Option D. -> main is called twice


None.


Question 68. Functions have static qualifier for its declaration by default.
  1.    true
  2.    false
  3.    Depends on the compiler
  4.    Depends on the standard
 Discuss Question
Answer: Option B. -> false


None.


Question 69. Which of the following is true for static variable?
  1.    It can be called from another function.
  2.    It exists even after the function ends.
  3.    It can be modified in another function by sending it as a parameter.
  4.    All of the mentioned
 Discuss Question
Answer: Option B. -> It exists even after the function ends.


None.


Question 70. What is the format identifier for "static a = 20.5;?
  1.    %s
  2.    %d
  3.    %f
  4.    Illegal declaration due to absence of data type
 Discuss Question
Answer: Option B. -> %d


None.


Latest Videos

Latest Test Papers