C Union Enum Bitfields Macros 31May2023

C Union Enum Bitfields Macros 31May2023

University

10 Qs

quiz-placeholder

Similar activities

CSE205-DCN-QUIZ-UNIT-5

CSE205-DCN-QUIZ-UNIT-5

University

10 Qs

Arquitectura de computadoras

Arquitectura de computadoras

University

10 Qs

SDF_B10B12Tutorial_December26

SDF_B10B12Tutorial_December26

University

10 Qs

OCS752_CP_MODEL 1_PART B (16.10.2020)

OCS752_CP_MODEL 1_PART B (16.10.2020)

University

10 Qs

Repaso Estructura de datos U1

Repaso Estructura de datos U1

1st Grade - University

10 Qs

[Pre-Test - BSES-2B] Introduction to Computers

[Pre-Test - BSES-2B] Introduction to Computers

University

15 Qs

Ulangan harian 1 Algoritma dan Pemrograman

Ulangan harian 1 Algoritma dan Pemrograman

12th Grade - University

13 Qs

C++ misc-1

C++ misc-1

University

15 Qs

C Union Enum Bitfields Macros 31May2023

C Union Enum Bitfields Macros 31May2023

Assessment

Quiz

Computers

University

Practice Problem

Hard

Created by

A M Abirami

Used 4+ times

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

45 sec • 1 pt

What is the size of union u? (runs in GDB compiler)

union u{

int x;

float y;

char z[10];

};

10

8

12

18

2.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

#include <stdio.h>

union u {

int x;

float y;

char z[10];

};

int main()

{

u.x = 2;

printf("%d\n",u.x);

return 0;

}

2

compile time error

undefined output

run time error

3.

FILL IN THE BLANK QUESTION

1 min • 1 pt

#include <stdio.h>

union u{

int x;

float y;

char z[10];

};

int main()

{

union u uu;

uu.x = 2;

printf("%d\n",uu.x);

return 0;

}

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

#include <stdio.h>

union u{

int x;

float y;

char z[10];

};

int main()

{

union u uu;

uu.x = 65;

printf("%c\n",uu.z[0]);

return 0;

}

65

A

AA

Undefined

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

#include <stdio.h>

struct s {

int x:5;

float y:6

};

int main()

{

struct s ss;

return 0;

}

Compile time error

Run time error

No output

6.

FILL IN THE BLANK QUESTION

1 min • 1 pt

struct s{

int x:5;

float y;

};

When sizeof(struct s) is used, ________ bytes is allocated;

7.

FILL IN THE BLANK QUESTION

1 min • 1 pt

struct s{

int x:5;

};

When sizeof(struct s) is used, ________ bytes is allocated;

Create a free account and access millions of resources

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?