CSE MCQs :: C-MCQs
- Which of the following are themselves a collection of different data types?
- User-defined data type can be derived by___________.
- Which of the following cannot be a structure member?
- Which of the following structure declaration will throw an error?
-
What is the output of this C code?
void main()
{
struct student
{
int no;
char name[20];
};
struct student s;
s.no = 8;
printf("%d", s.no);
} -
Number of bytes in memory taken by the below structure is?
struct test
{
int k;
char c;
}; - Size of a union is determined by size of the.
-
Comment on the following union declaration?
union temp
{
int a;
float b;
char c;
};
union temp s = {1,2.5,'A'}; //REF LINE
Which member of the union will be active after REF LINE?
-
What would be the size of the following union declaration?
union uTemp
{
double a;
int b[10];
char c;
}u;
(Assuming size of double = 8, size of int = 4, size of char = 1)