
OOP2023_B11B12Quiz_February06
Authored by MR ARORA
Computers
University
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
5 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
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
Predict the output of the given code.
No output
Compile time error
Run time error
1
3.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
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
Predict the output of the given code.
01234PP
0PP1PP2PP3PP4PP
Compilation Error
PP01234
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
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.
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Microsoft
or continue with
%20(1).png)
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?