What happens if you attempt to assign one structure variable to another of the same type?
Which of the following is a valid declaration of nested structure?
What is the primary advantage of using unions in embedded systems?
In a structure, what does the #pragma pack(1) directive do?
Which of the following correctly demonstrates a typedef for a structure?
Advertisement
If a structure contains a flexible array member, where must it be declared?
How can you create a structure that can hold either an integer or a floating-point number, but not both simultaneously?
What is the difference between 'struct' and 'typedef struct' in C?
In competitive programming, when implementing a graph using adjacency lists, which data structure is most suitable?
What will be the output if you read a union member that was not last written to?
Which of the following is the correct way to initialize a structure in C?
If you have a structure with bit fields, which statement about their behavior is true?
In a nested structure scenario, how do you access a member of the inner structure?
Which of the following statements about structures is TRUE?
What is the size of the following structure on a 32-bit system?
struct Point {
char c;
int x;
double y;
}
Consider the following code:
struct Data {
int a;
char b;
};
struct Data d = {10, 'A'};
Which method of initialization is used here?
What is the primary difference between a struct and a union in C?
What will be the output of this code?
union Data {
int a;
char b;
};
union Data d;
d.a = 257;
printf("%d %c", d.a, d.b);
Which of the following correctly demonstrates accessing a member of a pointer to a structure?
What is the size of the following union?
union Test {
int a[5];
char b[10];
double c;
}