0% found this document useful (0 votes)
3 views1 page

C Programming Structures and Unions Guide

The document contains practice questions for a course on problem-solving using C, focusing on structures, unions, and related concepts. It includes tasks such as defining and initializing structures, explaining unions and their differences from structures, and applying these concepts in C programs. Additionally, it covers topics like self-referential structures, typedef, enumerated types, and bit-fields.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views1 page

C Programming Structures and Unions Guide

The document contains practice questions for a course on problem-solving using C, focusing on structures, unions, and related concepts. It includes tasks such as defining and initializing structures, explaining unions and their differences from structures, and applying these concepts in C programs. Additionally, it covers topics like self-referential structures, typedef, enumerated types, and bit-fields.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Gayatri Vidya Parishad College of Engineering for Women

(Autonomous)
Practice Questions- Problem Solving using C – Unit – 4

1. Define a structure in C and illustrate how to initialize it with an example.


2. Illustrate the definition and usage of unions in C with an example and explain how they
differ from structures regarding size and memory allocation.
3. Explain structures in C, how they differ from unions, and give an example of a structure.
OR
Implement a union in C and explain how it differs from a structure with an example
4. Distinguish between self-referential structures and nested structures and provide
examples of both.
5. Analyze the use of typedef and enumerated types in C with an example and demonstrate
how they enhance code readability and maintainability.

6. Apply the concept of structures to develop a C program that reads and displays specific
employee information, including Employee_ID, Emp_Name, Date_of_Joining, and
Salary based on an employee ID from a list of 20 employees
7. Apply the concept of structures to Develop a C program for reading and displaying the
information of all the students in a class?
8. Explain the concept of an array of structures and a pointer to a structure with an
example.
9. Define a structure in C and use it to display the information of a student (name, roll
number, marks).
10. Write a C program to access individual elements in an array of structures

Define and demonstrate the use of bit-fields in C

You might also like