Workshop quiz

Workshop quiz

University

10 Qs

quiz-placeholder

Similar activities

Linux: Users and Groups

Linux: Users and Groups

9th Grade - University

14 Qs

CSC1243 - Introduction to Computer Programs (Programming Langua)

CSC1243 - Introduction to Computer Programs (Programming Langua)

University

10 Qs

OOP 1 Undiksha

OOP 1 Undiksha

12th Grade - University

13 Qs

TPG Basics of web3 and programming

TPG Basics of web3 and programming

University

10 Qs

Adobe Photoshop

Adobe Photoshop

University

10 Qs

CIT 111 Theory Lecture Quiz

CIT 111 Theory Lecture Quiz

University

10 Qs

Google Aptitude Test

Google Aptitude Test

KG - University

10 Qs

Mrs O's Computer Architecture Quiz

Mrs O's Computer Architecture Quiz

KG - University

13 Qs

Workshop quiz

Workshop quiz

Assessment

Quiz

Computers

University

Practice Problem

Hard

Created by

Mohammed Nawaz

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a structure in C?

A way to create a new data type that can hold multiple variables of different types.

A built-in data type.

  • A function that performs calculations.

A control flow statement.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which keyword is used to define a structure in C?

  • B) define

  • struct

  • union

  • type

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the maximum number of members a structure can have in C?

  • B) 100

  • No fixed limit

  • 50

  • 10

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the main difference between a structure and a union?

  • Unions cannot contain functions.

Structures can hold only integers.

  • Structures are always larger than unions.

  • A structure allocates memory for all its members, while a union allocates memory for only the largest member.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you define a structure named Person with members name (string) and age (integer)?

  • struct Person { char name[50]; int age; };

  • struct Person { int age; char name; };

  • struct { char name; int age; } Person;

Person { char name[50]; int age; };

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What operator is used to access a member of a structure through a pointer?

  • .

  • *

  • ->

  • ::

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Can a structure contain a union as a member?

  • Yes

  • No

  • Only if the structure is empty.

  • Only if the union has no members.

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?