
C Programming Quiz
Quiz
•
Others
•
1st Grade
•
Hard
Kaustubh Pandey
Used 1+ times
FREE Resource
Enhance your content
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
what is output of this code? #include int main() { printf("%c ", 5["GeeksQuiz"]); return 0; }
Compile-time error
Runtime error
Q
s
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is true
gets() can read a string with newline characters but a normal scanf() with %s can not.
gets() can read a string with spaces but a normal scanf() with %s can not.
gets() can always replace scanf() without any additional code.
None of the above
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following functions from “stdio.h” can be used in place of printf()?
fputs() with FILE stream as stdout.
fprintf() with FILE stream as stdout.
fwrite() with FILE stream as stdout.
All of the above three - a, b and c.
In “stdio.h”, there’s no other equivalent function of printf().
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is not a valid declaration in C?
3 and 4
short int x;
short x;
unsigned short x;
signed short x;
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In C, sizes of an integer and a pointer must be same.
True
False
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Suppose a C program has floating constant 1.414, what's the best way to convert this as "float" data type?
(float)1.414
float(1.414)
1.414f or 1.414F
1.414 itself of "float" data type i.e. nothing else required.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is output? #include int main(void) { int a = 1; int b = 0; b = a++ + a++; printf("%d %d",a,b); return 0; }
3 6
Compiler Dependent
3 4
3 3
Create a free account and access millions of resources
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple

Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
Popular Resources on Wayground
20 questions
Brand Labels
Quiz
•
5th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
20 questions
ELA Advisory Review
Quiz
•
7th Grade
15 questions
Subtracting Integers
Quiz
•
7th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns
Quiz
•
3rd Grade
10 questions
Exploring Digital Citizenship Essentials
Interactive video
•
6th - 10th Grade
Discover more resources for Others
11 questions
NFL Football logos
Quiz
•
KG - Professional Dev...
18 questions
D189 1st Grade OG 1c Concept 37-38
Quiz
•
1st Grade
20 questions
addition
Quiz
•
1st - 3rd Grade
20 questions
Subject and predicate in sentences
Quiz
•
1st - 3rd Grade
20 questions
Place Value
Quiz
•
KG - 3rd Grade
10 questions
Exploring Force and Motion Concepts
Interactive video
•
1st - 5th Grade
10 questions
Exploring Properties of Matter
Interactive video
•
1st - 5th Grade
5 questions
Sense and Response
Quiz
•
1st Grade