Structures and union

Structures and union

Assessment

Flashcard

Computers

University

Hard

Created by

Quizizz Content

FREE Resource

Student preview

quiz-placeholder

36 questions

Show all answers

1.

FLASHCARD QUESTION

Front

Which of the following are themselves a collection of different data types? String, Structure, Integer, None of these

Back

Structure

2.

FLASHCARD QUESTION

Front

Which of the following cannot be a structure member? Another structure, Array, Function, None of these

Back

Function

3.

FLASHCARD QUESTION

Front

What is the output of this C code?
#include <stdio.h>
struct student
{
int no; char name[20];
};
void main()
{
student s;
s.no = 8;
printf("hello");
}

Back

Compilation error

4.

FLASHCARD QUESTION

Front

Which of the following share a similarity in syntax? 1. Union, 2. Structure, 3. Arrays and 4. Pointers

Back

2 & 3

5.

FLASHCARD QUESTION

Front

For what minimum value of x in a 32-bit Linux OS would make the size of s equal to 8 bytes? struct temp { int a : 13; int b : 8; int c : x; } s;

Back

12

6.

FLASHCARD QUESTION

Front

Which operator connects the structure name to its member name?

Back

.

7.

FLASHCARD QUESTION

Front

Size of the following union (assume size of int=2, size of float=4 and size of char=1); union ABC { int a; float b; char c; };

Back

4

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?