Structures and Union

Structures and Union

University

15 Qs

quiz-placeholder

Similar activities

GLOBALIZATION AND THE FUTURE OF HOSPITALITY

GLOBALIZATION AND THE FUTURE OF HOSPITALITY

University

15 Qs

KUIS MATA KULIAH ENTREPRENEURSHIP - MANAJEMEN 2022

KUIS MATA KULIAH ENTREPRENEURSHIP - MANAJEMEN 2022

University

20 Qs

SAS 2021

SAS 2021

University

20 Qs

Macro Economics 19.1 - 19.2

Macro Economics 19.1 - 19.2

University

14 Qs

Magajastra

Magajastra

University

20 Qs

Penilaian Obligasi

Penilaian Obligasi

University

10 Qs

TOPIC 2 DYA20063

TOPIC 2 DYA20063

University

10 Qs

WILMA RUDOLPH

WILMA RUDOLPH

KG - University

10 Qs

Structures and Union

Structures and Union

Assessment

Quiz

Other

University

Practice Problem

Medium

Created by

Kavinaya R

Used 1+ times

FREE Resource

AI

Enhance your content in a minute

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

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a structure in C?

A data type used to store integers only

A user-defined data type that groups related variables

loop structure

pre-defined C function

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which keyword is used to define a structure in C?

struct

define

typedef

union

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct way to declare a structure named Student with name and age?

struct Student { char name[50]; int age; };

structure Student { char name[50]; int age; };

define Student { name[50], age };

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

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you access the member age of a structure variable s1?

s1 -> age

s1.age

s1:age

s1(age)

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you create a variable s1 of type struct Student?

Student s1;

struct s1 Student;

struct Student s1;

Student: s1;

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Can structures hold different data types?

No, all members must be same type

Yes, only integers and floats

Yes, any combination of data types

Only characters

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the size of a structure dependent on?

Number of members

Type and size of members

Order of declaration

All of the above

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?