MCQs
Total Questions : 72
| Page 2 of 8 pages
Answer: Option A. -> Yes
No answer description available for this question.
Answer: Option B. -> False
No answer description available for this question.
Answer: Option A. -> True
No answer description available for this question.
Answer: Option A. -> True
No answer description available for this question.
Answer: Option A. -> True
No answer description available for this question.
Answer: Option A. -> True
No answer description available for this question.
Answer: Option C. -> Enumeration can have an effect local to the block, if desired
No answer description available for this question.
Answer: Option A. -> True
No answer description available for this question.
Answer: Option B. -> False
#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
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
Answer: Option A. -> True
No answer description available for this question.