
C Programming Quiz

Quiz
•
Computers
•
Professional Development
•
Easy
Dr. SRET
Used 1+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Choose the correct statement while (0 == 0) { }
It has syntax error as there are no statements within braces {}
It will run forever
It compares 0 with 0 and since they are equal it will exit the loop immediately
It has syntax error as the same number is being compared with itself
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Given the below statements about C programming language; 1) main() function should always be the first function present in a C program file 2) all the elements of an union share their memory location 3) A void pointer can hold address of any type and can be typecasted to any type 4) A static variable hold random junk value if it is not initialised Which of the above are correct statements?
2,3
1,2
1,2,3
1,2,3,4
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which one is used during memory deallocation in C?
remove(p);
delete(p);
free(p);
terminate(p);
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Predict the output of following code: main() { int a=b=c=d=10; printf("%d,%d,%d,%d",a,b,c,d); }
Error
10,10,10,10
Garbage Value,Garbage Value,Garbage Value,10
Garbage Value,Garbage Value,Garbage Value,Garbage Value
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How many times the below loop will be executed? #include
5
1
0
3
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Predict the output of following code: main() { int a=10,x; x= a- + ++a; printf("%d",x); }
A) 19
B) 20
C) 22
D) 23
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following does not require to include math.h header file?
A) pow()
B) rand()
C)sqrt()
D) sinh()
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
Podstawy programowania

Quiz
•
Professional Development
9 questions
BD-Cuestionario3

Quiz
•
Professional Development
10 questions
C Code Master lvl 2 A

Quiz
•
Professional Development
10 questions
C Programming

Quiz
•
Professional Development
10 questions
Day 3 C Programming quiz

Quiz
•
Professional Development
10 questions
C Programming

Quiz
•
Professional Development
15 questions
C Language Quiz-1

Quiz
•
University - Professi...
10 questions
Basic Programming Kotlin

Quiz
•
Professional Development
Popular Resources on Wayground
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
20 questions
PBIS-HGMS

Quiz
•
6th - 8th Grade
10 questions
"LAST STOP ON MARKET STREET" Vocabulary Quiz

Quiz
•
3rd Grade
19 questions
Fractions to Decimals and Decimals to Fractions

Quiz
•
6th Grade
16 questions
Logic and Venn Diagrams

Quiz
•
12th Grade
15 questions
Compare and Order Decimals

Quiz
•
4th - 5th Grade
20 questions
Simplifying Fractions

Quiz
•
6th Grade
20 questions
Multiplication facts 1-12

Quiz
•
2nd - 3rd Grade