Hackharbor 3.0 Day 4:C

Hackharbor 3.0 Day 4:C

University

30 Qs

quiz-placeholder

Similar activities

Hackharbor 3.0 : Day 5 API and JSON Quiz

Hackharbor 3.0 : Day 5 API and JSON Quiz

University

27 Qs

ввп,

ввп,

University

35 Qs

HARSHA R QUIZ

HARSHA R QUIZ

University

25 Qs

Data Structures Quiz

Data Structures Quiz

University

30 Qs

SQL QUIZ

SQL QUIZ

University

25 Qs

Digital Forensics -  S19

Digital Forensics - S19

University

25 Qs

Module 1 (Embedded Systems - Quiz)

Module 1 (Embedded Systems - Quiz)

University

30 Qs

FSD based

FSD based

University

25 Qs

Hackharbor 3.0 Day 4:C

Hackharbor 3.0 Day 4:C

Assessment

Quiz

Engineering

University

Hard

Created by

Vivek N

Used 10+ times

FREE Resource

30 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the key difference between a structure and a union in C?

Structure shares memory among members, union does not

Union shares memory among members, structure does not

Structure allows only one member, union allows multiple

Both allocate memory exactly the same way

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does a struct say to a union at a party?

“I like my space, you share yours”

“Youʼre occupying my memory!”

“Letʼs combine and confuse the compiler!”

“Letʼs be friends forever!”

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which operator is used to access members of a structure variable in C?

meow

. (dot)

&

*

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following keywords is used to define a user-defined data type combining different data types?

class

union

struct

typedef

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will happen if you assign a value to one member of a union and then assign another value to a different member?

Both values get stored separately

The latter assignment overwrites the first value

Compiler error

Both values remain unchanged

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Why are structure members always calm?

Because they each have their own space to chill

They work too hard to care

They donʼt share memory, so no conflicts

They meditate regularly

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In a union, what is the size of the memory block allocated?

Sum of all membersʼ sizes

Size of the smallest member

Size of the largest member

None of the above

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?