Structures — Study Resources & PYQs
Fundamentals and declaration of structures in C.
- Estimated study time: 30 minutes
Study resources
- Structures and Unions section - GeeksforGeeks tutorial (Article) — Covers struct declaration, initialisation, the dot operator, nested structures and arrays of structures, then unions and enums in the same section.
- C struct - Programiz (Article) — A gentler introduction with a student-record example running through it. Read this before the GeeksforGeeks version if structures are new to you.
- Structure Pointer in C - GeeksforGeeks (Article) — Shows both ways of accessing members through a pointer: (*ptr).member and ptr->member. Knowing they are equivalent is worth marks.
- C structs and Pointers - Programiz (Article) — Same topic with a fuller example, including dynamically allocating structures. Links naturally into the dynamic memory allocation topic in Unit 6.
- C Structures (GeeksforGeeks) (Article) — Comprehensive guide to structures in C — why they're needed, how to declare and initialize them, and their key differences from arrays.
- Introduction to Structures in C (Video) — Lecture explaining why structures are needed in C and how to define a structure, ideal as a first watch before reading the written notes above.
Structures previous year questions
- (b) Write a c-program using structures to read, write, compute average - marks and display the students scoring above and below the average marks for a class o…
- 7. (a) Explain array of structures and structure within a structure with examples.
- (a) Represent a complex number using a structure in C. Write a C program that uses functions to perform the following operations: (i) Addition of two complex n…
- (a) How to create a structure in C Programming. And how to access the variable in structure. Illustrate with the help of example. (10) (b) Describe the various…
- (a) Write down the difference between structure and union. Write a 'C' program to read following details of 50 students. Student Name, Student Roll No, Class D…
- (a) Differentiate between local and global variables. Explain scope and lifetime of both types of variables. (08) (b) What is structure? Why structure is neede…
Taught in these subjects
- COMPUTER PROGRAMMING — BCST11 · Government College of Engineering and Technology, Jammu
- Computer Programming — CST3101 · Government College of Engineering and Technology, Jammu
- Fundamentals of Programming Using C — CST3201 · Government College of Engineering and Technology, Jammu