GEC Bilaspur Quiz 5 -- C++ -- Prof. Manish Tiwari

Quiz
•
Computers
•
University
•
Easy
Manish Tiwari
Used 17+ times
FREE Resource
5 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
Given condition 1: Class A is base class, and there are 5 other classes derived directly from this class (A1, A2, A3, A4 and A5). Each derived class has additional member int z defined in public section of each derived class.
Class A has 2 members declared in private section: <int x1> and <void getdata()>.
Class A has 4 members declared in protected section: <int p1, p2, p3, p4>.
Class A has 2 members declared in public section: <float r1, r2>.
All question further are based on this condition only. Assume every variable and every function takes exactly 1 block of memory.
.............................................................................................................................
Q1---In int main() function, if first line of code, how many memory blocks will be allocated after this line is executed.
................................................
A Student;
2
8
13
1
2.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
For Condition 1---
Q2---If this is 1 line of code in int main(), how many memory blocks will be allocated in total and how many will have some valid data in these blocks and how many will be empty in these blocks. Answer in 3 parts as "Total Allocated / Valid Data / Empty"
............................
A1 Grades;
1/0/1
8/1/7
1/1/0
9/0/9
3.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
For Condition 1--
Q3--If these are 2 lines of code in int main(), how many memory blocks will have valid data in them.
.....................................................................................
A rt1;
A1 rt2;
A2 rt3;
3
10
0
9
4.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
For Condition 1--
Q4--If an 8 bit register is considered as "one" block of memory, how many total bits will be allocated in total, if this one line of code is written in int main().
.......................................................................
A1 rt2;
1x8
9x8
7x8
8
5.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
For Condition 1---Modified--Instead of every variable and function using only 1 block of memory, now variable uses 1 block and function uses 4 blocks of memory.
..................................
Q5--If one block is 8 bit register, how many total memory bits will be allocated after execution of these lines of code in int main().
......................................
Line 1----- int k1;
Line 2---- A1 A9;
Line 3---- A A12;
Line 4---- A4 B1;
Line 5--- B1.z = 45;
5x8= 40 bits
21x8 = 168 bits
28x8 = 224 bits
36x8 = 288 bits
Similar Resources on Wayground
10 questions
Structure in C

Quiz
•
University
10 questions
Basic java

Quiz
•
University
10 questions
Quiz 3

Quiz
•
University
9 questions
IPC144 SLG -- Week2

Quiz
•
University
10 questions
Basics of C

Quiz
•
University
8 questions
Image Representation Quiz

Quiz
•
9th Grade - University
10 questions
Java Arrays

Quiz
•
University
10 questions
PDS - 04225 Pointers & Dynamic Arrays - Chapter 8

Quiz
•
University - Professi...
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

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

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
Would you rather...

Quiz
•
KG - University
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
10 questions
The Constitution, the Articles, and Federalism Crash Course US History

Interactive video
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
16 questions
Water Modeling Activity

Lesson
•
11th Grade - University
10 questions
ACT English prep

Quiz
•
9th Grade - University