top of page
Frequently Asked C Language Interview Question & Answers
What is a structure in C Language? How to initialise a structure in C?
A structure is a composite data type declaration that defines a physically grouped list of variables to be placed under one name in a block of memory, allowing the different variables to be accessed via a single pointer.
Defining a structure in C: In C language a structure is defined using struct keyword followed by variable or pointer name below is the basic syntax for declaring a structure in C language.
struct tag_name
{
type member1;
type member2;
/* declare as many members as desired, but the entire structure size must be known to the compiler. */
};
bottom of page