Q.No.1

What is the correct way to declare a union named 'data' with members 'number' (int) and 'name' (char array of 20) in C?

Q.No.2

How do you pass a structure to a function in C for modification?

Q.No.3

What is the correct syntax for accessing the 'salary' member of a structure variable 'employee' of type 'Employee' in C?

Q.No.4

What is the primary advantage of using structures in C?

Q.No.5

How do you define a union inside a structure named 'item' with members 'id' (int) and 'price' (float) in C?

Q.No.6

What is the correct way to declare a pointer to a structure 'person' in C?

Q.No.7

In C, what does a structure typedef declaration allow you to do?

Q.No.8

How do you access a member 'price' of a union variable 'product' in C that is of type 'Product' with members 'id' (int) and 'price' (float)?

Q.No.9

What is the correct way to initialize a structure member 'day' of type 'Date' within a structure variable 'event' in C?

Q.No.10

What is the purpose of using unions over structures in C?


About Simple Quiz

We're here to make learning fun and accessible. Whether you're a student, teacher, or just someone who loves quizzes, you can find something for you here. Test your knowledge across a wide range of subjects and see how much you know!


Get to know more

Quiz On

Learn about structures and unions in C programming, including definition, member access, nested structures, and their use in functions.

Category

Discover the foundational principles of C programming, ideal for beginners entering the world of coding.


C Programming

Sector

Test your knowledge on the fundamentals of creating software by writing and understanding code in various programming languages.


Programming


Start A Quiz

Do you want to start quiz mode? In this mode, you’ll answer against a timer. When the timer runs out, answers auto-submit, and you get feedback.

Start A Quiz

Do you want to start quiz mode? You'll answer against a timer. When the timer runs out, answers auto-submit