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

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

University

5 Qs

quiz-placeholder

Similar activities

DDT1B_Pre-test_080322

DDT1B_Pre-test_080322

University

10 Qs

C++ vs Python: A Quiz Introduction

C++ vs Python: A Quiz Introduction

11th Grade - University

10 Qs

QUIZ TECH EASY ROUND!

QUIZ TECH EASY ROUND!

University

10 Qs

common data structure

common data structure

University

10 Qs

Basics Of C Programming

Basics Of C Programming

University

10 Qs

C Programming Quiz-1

C Programming Quiz-1

University

10 Qs

C++ Pointers and Arrays

C++ Pointers and Arrays

University - Professional Development

10 Qs

C# Variables and Data Types

C# Variables and Data Types

8th Grade - University

9 Qs

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

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

Assessment

Quiz

Computers

University

Easy

Created by

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