
PCDS Lab Quiz
Authored by Debi Mishra
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
1 min • 1 pt
char txt [20] = “Hello world!\0”;
How many bytes are allocated by the definition above?
11 bytes
12 bytes
13 bytes
20 bytes
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which one of the following statements allocates enough space to hold an array of 10 integers that are initialized to 0?
int ptr = (int ) malloc(10, sizeof(int));
int ptr = (int ) calloc(10, sizeof(int));
int ptr = (int ) malloc(10*sizeof(int));
int ptr = (int ) alloc(10*sizeof(int));
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What will be output if you will execute following c code?
20
11
12
22
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What will be the output of the given code?
c questions
c (null)
(null) (null)
Compilation error
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What will be the output of the given code?
4
24
25
Infinite loop
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?