
C Quiz 1
Authored by Jenefa Engineering
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
13 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the C program?
#include<stdio.h>
int main() {
char num = '\010';
printf("%d", num);
return 0; }
010
10
8
08
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the C program?
#include<stdio.h>
int main() {
void num=10;
printf("%v", num);
return 0; }
Garbage Value
10
Compilation error
0
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the C program?
#include<stdio.h>
int main() {
void *ptr;
int num = 10;
ptr = #
printf("%d", ptr);
return 0; }
10
0
Address
Compilation Error
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the C program?
#include<stdio.h>
int main() {
printf("%d\t",sizeof(2.5));
printf("%d\t",sizeof(2));
printf("%d",sizeof('A'));
return 0; }
8 4 1
8 4 2
4 4 1
2 5 2 A
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is not a valid C variable name?
int _a8;
int _8a;
int @a8;
int a8;
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which is valid C expression?
int my num = 100,000;
int my_num = 100000;
int my_num = 100,000;
int $my_num = 100,000;
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following cannot be a variable name in C?
volatile
true
friend
export
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?