Sail E0 Webinar

MCQs

Total Questions : 72 | Page 2 of 8 pages
Question 11.

size of union is size of the longest element in the union


  1.    Yes
  2.    No
 Discuss Question
Answer: Option A. -> Yes

No answer description available for this question. 


Question 12.

It is not possible to create an array of pointer to structures.


  1.    True
  2.    False
 Discuss Question
Answer: Option B. -> False

No answer description available for this question. 


Question 13.

The '->' operator can be used to access structures elements using a pointer to a structure variable only


  1.    True
  2.    False
 Discuss Question
Answer: Option A. -> True

No answer description available for this question. 


Question 14.

Union elements can be of different sizes.


  1.    True
  2.    False
 Discuss Question
Answer: Option A. -> True

No answer description available for this question. 


Question 15.

A structure can contain similar or dissimilar elements


  1.    True
  2.    False
 Discuss Question
Answer: Option A. -> True

No answer description available for this question. 


Question 16.

The '.' operator can be used access structure elements using a structure variable.


  1.    True
  2.    False
 Discuss Question
Answer: Option A. -> True

No answer description available for this question. 


Question 17.

Which of the following statement is True?


  1.    User has to explicitly define the numeric value of enumerations
  2.    User has a control over the size of enumeration variables.
  3.    Enumeration can have an effect local to the block, if desired
  4.    Enumerations have a global effect throughout the file.
 Discuss Question
Answer: Option C. -> Enumeration can have an effect local to the block, if desired

No answer description available for this question. 


Question 18.

A structure can be nested inside another structure.


  1.    True
  2.    False
 Discuss Question
Answer: Option A. -> True

No answer description available for this question. 


Question 19.

Bit fields CANNOT be used in union.


  1.    True
  2.    False
 Discuss Question
Answer: Option B. -> False


The following is the example program to explain "using bit fields inside an union".


#include<stdio.h>
union Point
{
unsigned int x:4;
unsigned int y:4;
int res;
};
int main()
{
union Point pt;
pt.x = 2;
pt.y = 3;
pt.res = pt.y;
printf("\n The value of res = %d" , pt.res);
return 0;
}
// Output: The value of res = 3


Question 20.

one of elements of a structure can be a pointer to the same structure.


  1.    True
  2.    False
 Discuss Question
Answer: Option A. -> True

No answer description available for this question. 


Latest Videos

Latest Test Papers