What happens to the memory allocation when a structure is defined?
- Memory is allocated for all its members
- Memory is allocated for the structure itself
- Memory is allocated only for the first member
- No memory allocation occurs
When you define a structure in C, memory is allocated for the structure itself, which includes memory for all its members.
Loading...
Related Quiz
- How does the execution stack change when a recursive function is called in C?
- While reviewing a C program, you come across a scenario where a pointer is freed but later used in the program. What issue could this lead to?
- Which function in C is used to flush the output buffer of a stream?
- What is the primary function of pointers in C?
- What is the primary purpose of the malloc function in C?