Skip to content
Courses
DSA to Development
Get IBM Certification
Newly Launched!
Master Django Framework
Become AWS Certified
For Working Professionals
Interview 101: DSA & System Design
Data Science Training Program
JAVA Backend Development (Live)
DevOps Engineering (LIVE)
Data Structures & Algorithms in Python
For Students
Placement Preparation Course
Data Science (Live)
Data Structure & Algorithm-Self Paced (C++/JAVA)
Master Competitive Programming (Live)
Full Stack Development with React & Node JS (Live)
Full Stack Development
Data Science Program
All Courses
Tutorials
Data Structures & Algorithms
ML & Data Science
Interview Corner
Programming Languages
Web Development
CS Subjects
DevOps And Linux
School Learning
Practice
Build your AI Agent
GfG 160
Problem of the Day
Practice Coding Problems
GfG SDE Sheet
Contests
Accenture Hackathon (Ending Soon!)
GfG Weekly [Rated Contest]
Job-A-Thon Hiring Challenge
All Contests and Events
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
SQL
Web Development
System Design
Aptitude
GfG Premium
Sign In
▲
Similar Topics
DSA
22.5k+ articles
Arrays
6.4k+ articles
C++
4.2k+ articles
Difference Between
3.6k+ articles
C Language
2.1k+ articles
C Programs
690+ articles
C Examples
95 articles
C Basics
76 articles
C-Structure & Union
53 articles
cpp-structure
18 articles
C-Struct-Union-Enum
16 posts
Popular Articles
Recent Articles
When to Use Enum Instead of Define in C?
Last Updated: 02 April 2024
In C programming, both#defineandenumcan be used to declare integer constants but there are situations where usingenumis more beneficial than
...read more
C Basics
C Language
C-Struct-Union-Enum
C Programs
Picked
C Examples
How to Use a Union to Save Memory in C?
Last Updated: 13 February 2024
Unions in C offer a unique mechanism for storing different variables in the same memory location. These variables are called members of the
...read more
C Language
C-Structure & Union
C-Struct-Union-Enum
C Programs
Picked
C Examples
How to Modify Struct Members Using a Pointer in C?
Last Updated: 08 February 2024
In C++, we use structure to group multiple different types of variables inside a single type. These different variables are called the membe
...read more
C Language
C-Pointers
C-Struct-Union-Enum
C Programs
Picked
C Examples
Similar Topics
DSA
22.5k+ articles
Arrays
6.4k+ articles
C++
4.2k+ articles
Difference Between
3.6k+ articles
C Language
2.1k+ articles
C Programs
690+ articles
C Examples
95+ articles
C Basics
76+ articles
C-Structure & Union
53+ articles
cpp-structure
18+ articles
How to Declare a Pointer to a Struct in C?
Last Updated: 05 February 2024
Structure (or structs) in the C programming language provides a way to combine variables of several data types under one name and pointers p
...read more
C Language
C-Pointers
C-Struct-Union-Enum
C Programs
Picked
C Examples
Difference between Struct and Enum in C/C++ with Examples
Last Updated: 05 September 2023
Structure in C++A structure is a user-defined data type in C/C++. A structure creates a data type that can be used to group items of possibl
...read more
C Language
C++
Difference Between
C-Struct-Union-Enum
Array of Structures vs Array within a Structure in C
Last Updated: 10 January 2025
Both Array of Structures and Array within a Structure in C programming is a combination of arrays and structures but both are used to serve
...read more
Arrays
cpp-structure
C Language
C++
Data Structures
Arrays
C-Structure & Union
Difference Between
C-Struct-Union-Enum
cpp-struct
DSA
C program to store Student records as Structures and Sort them by Name
Last Updated: 17 January 2019
Given student's records with each record containing id, name and age of a student. Write a C program to read these records and display them
...read more
Sorting Quiz
C Language
C-Struct-Union-Enum
C Programs
“static const” vs “#define” vs “enum”
Last Updated: 25 October 2018
In this article, we will be analyzing "static const", "#define" and "enum". These three are often confusing and choosing which one to use ca
...read more
C Language
C++
C-Struct-Union-Enum
Picked
Technical Scripter 2018
Designated Initializers in C
Last Updated: 27 April 2022
Standard C90 requires the elements of an initializer to appear in a fixed order, the same as the order of the elements in the array or struc
...read more
Technical Scripter
c-array
C Language
C-Struct-Union-Enum
C/C++ Puzzles
Structure Sorting (By Multiple Rules) in C++
Last Updated: 05 April 2023
Prerequisite : Structures in CName and marks in different subjects (physics, chemistry and maths) are given for all students. The task is to
...read more
Arrays
Searching
Sorting
cpp-structure
C Language
C++
C-Struct-Union-Enum
DSA
Enumeration (or enum) in C
Last Updated: 08 May 2025
In C, an enumeration (or enum) is a user defined data type that contains a set of named integer constants. It is used to assign meaningful n
...read more
C Basics
cpp-data-types
C Language
C-Struct-Union-Enum
C Unions
Last Updated: 24 April 2025
In C, union is a user-defined data type that can contain elements of the different data types just like structure. But unlike structures, al
...read more
C Basics
C Language
C-Struct-Union-Enum
Struct Hack
Last Updated: 06 September 2021
What will be the size of following structure?[tabby title="CPP"][sourcecode language="CPP"]struct employee{ int emp_id; int na
...read more
cpp-structure
C Language
C-Struct-Union-Enum
Structure Member Alignment, Padding and Data Packing
Last Updated: 10 January 2025
In C, the structures are used as data packs. They don't provide any data encapsulation or data hiding features.In this article, we will disc
...read more
C Language
C-Struct-Union-Enum
Operations on struct variables in C
Last Updated: 16 January 2019
In C, the only operation that can be applied to struct variables is assignment. Any other operation (e.g. equality check) is not allowed on
...read more
C Language
C-Struct-Union-Enum
1
2
>>
Last
1
2
>>
Last
1
2
>>
Last
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !