OOP2023_B11B12Quiz_February06

OOP2023_B11B12Quiz_February06

University

5 Qs

quiz-placeholder

Similar activities

Python with DataScience

Python with DataScience

7th Grade - University

10 Qs

Rounding Numbers in Python

Rounding Numbers in Python

University

9 Qs

C quiz

C quiz

11th Grade - University

10 Qs

Microprocessors_DUTh_1

Microprocessors_DUTh_1

University

10 Qs

Variables and Functions

Variables and Functions

KG - University

10 Qs

java quiz on Encapsulation and Abstraction

java quiz on Encapsulation and Abstraction

University

10 Qs

UTILITY PROGRAM

UTILITY PROGRAM

University

10 Qs

Latihan Ujian TKJ - Bagian A1

Latihan Ujian TKJ - Bagian A1

7th Grade - University

10 Qs

OOP2023_B11B12Quiz_February06

OOP2023_B11B12Quiz_February06

Assessment

Quiz

Computers

University

Practice Problem

Hard

Created by

MR ARORA

Used 1+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

Assuming size of pointer is 4 bytes and size of int is also 4 bytes, pick the most correct answer from the given options that can correctly describe about the three statements written in code snippet.

ii) and iii) would result in compile error but i) would compile and result in size as 4.

Only i) would compile successfully and it would return size as 4.

i), ii) and iii) would compile successfully and size of each would be same i.e. 4

i), ii) and iii) would compile successfully but the size of each would be different and would be decided at run time.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Predict the output of the given code.

No output

Compile time error

Run time error

1

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

Pick the best statement for the given C program snippet.

Assigning (void *)0 to pVoid isn’t correct because memory hasn’t been allocated. That’s why no compile error but it'll result in run time error.

Assigning (void *)0 to pVoid isn’t correct because a hard coded value (here zero i.e. 0) can’t assigned to any pointer. That’s why it'll result in compile error.

No compile issue and no run time issue. And the size of the void pointer i.e. pVoid would equal to size of int.

sizeof() operator isn’t defined for a pointer of void type.

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

Predict the output of the given code.

01234PP

0PP1PP2PP3PP4PP

Compilation Error

PP01234

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Consider the given variable declarations and definitions in C

Both i) and iii) are valid.

Only i) is valid.

Both i) and ii) are valid.

All are valid.