C Programming: Structures in C

C Programming: Structures in C

10th Grade

16 Qs

quiz-placeholder

Similar activities

C Programming Concepts

C Programming Concepts

10th Grade

15 Qs

ICT 10 Review Quiz

ICT 10 Review Quiz

10th Grade

12 Qs

Principles of Computer Science

Principles of Computer Science

10th - 12th Grade

20 Qs

Computer Science 2: Control Structures

Computer Science 2: Control Structures

8th - 12th Grade

11 Qs

Pointer Arithmetic in C Programming

Pointer Arithmetic in C Programming

9th - 12th Grade

15 Qs

AQA GCSE Databases and SQL

AQA GCSE Databases and SQL

9th - 12th Grade

14 Qs

GCSE Databases

GCSE Databases

9th - 11th Grade

18 Qs

C++ programming

C++ programming

7th - 12th Grade

20 Qs

C Programming: Structures in C

C Programming: Structures in C

Assessment

Quiz

Computers

10th Grade

Easy

Created by

Karen Tan

Used 33+ times

FREE Resource

16 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 15 pts

What is a structure in C programming?

A special character in C programming

A built-in function in C programming

A user-defined data type that allows you to combine data items of different types.

A type of loop in C programming

2.

MULTIPLE CHOICE QUESTION

1 min • 15 pts

What are the member variables of the 'Student' structure?

The member variables of the 'Student' structure will depend on how it is defined in the C program, and can include attributes such as name, age, roll number, and marks.

The member variables of the 'Student' structure are not necessary in a C program

The member variables of the 'Student' structure are only limited to integers

The member variables of the 'Student' structure are always name, age, and gender

3.

MULTIPLE CHOICE QUESTION

1 min • 15 pts

What is the syntax for inputting data into a structure in C?

structName->memberName = value;

structName.memberName = value

structName.memberName = value;

structName.memberName : value;

4.

MULTIPLE CHOICE QUESTION

1 min • 15 pts

How do you access the member variables of a structure in C?

Using the asterisk (*) operator

Using the dot (.) operator

Using the hash (#) operator

Using the plus (+) operator

5.

MULTIPLE CHOICE QUESTION

1 min • 15 pts

Write a C program to input data for a student using the 'Student' structure.

Define a structure named 'Student' with the required fields and use the scanf function to input the data for the student.

Define a structure named 'Person' instead of 'Student' to input the data

Use the 'printf' function to input the data for the student

Create a function named 'Student' to input the data

6.

MULTIPLE CHOICE QUESTION

1 min • 15 pts

Write a C program to calculate the average of total marks for two students using the 'Student' structure.

Create a C program that would access the total marks for each student in the structure, get its sum and divide the sum to the number of students

Define a variable to store the average of total marks for two students

Create a function to calculate the average of total marks for two students

Use the 'Student' structure to calculate the sum of total marks for two students

7.

MULTIPLE CHOICE QUESTION

1 min • 15 pts

What is the purpose of using structures in C programming?

To group different data types together under a single name for easier organization and manipulation.

To create graphical user interfaces

To perform mathematical calculations

To handle network communication

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?