
C Union Enum Bitfields Macros 31May2023

Quiz
•
Computers
•
University
•
Hard
A M Abirami
Used 4+ times
FREE Resource
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
Similar Resources on Wayground
10 questions
Динамические библиотеки

Quiz
•
University
10 questions
Operators & Precedence- c

Quiz
•
University
8 questions
C debugging Qs

Quiz
•
University
12 questions
Programming in C by Khushboo Bhardwaj

Quiz
•
University
7 questions
unary operators

Quiz
•
University
12 questions
C Basics

Quiz
•
University
12 questions
OS with C programming

Quiz
•
University
15 questions
EDA PARTE 2

Quiz
•
University
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
21 questions
Spanish-Speaking Countries

Quiz
•
6th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
7 questions
Common and Proper Nouns

Interactive video
•
4th Grade - University
12 questions
Los numeros en español.

Lesson
•
6th Grade - University
7 questions
PC: Unit 1 Quiz Review

Quiz
•
11th Grade - University
7 questions
Supporting the Main Idea –Informational

Interactive video
•
4th Grade - University
12 questions
Hurricane or Tornado

Quiz
•
3rd Grade - University
7 questions
Enzymes (Updated)

Interactive video
•
11th Grade - University