
C Programming Lab Quiz 1

Quiz
•
Engineering
•
University
•
Hard
Sunil Kumar
Used 1+ times
FREE Resource
24 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Identify the option that does not represent a logical operator:
&&
||
!
|
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a valid C expression for declaring an integer variable?
int my_num = 100,000;
int my_num = 100000;
int my num = 1000;
int $my_num = 10000;
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which for loop has range of similar indexes of ‘i’ used in for (i = 0;i < n; i++)?
for (i = n; i>0; i--)
for (i = n; i >= 0; i--)
for (i = n-1; i>0; i--)
for (i = n-1; i>-1; i--)
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What will be the output of the following C code?
#include <stdio.h>
void main()
{
double k = 0;
for (k = 0.0; k < 3.0; k++)
printf("Hello");
}
Run time error
Hello is printed thrice
Hello is printed twice
Hello is printed infinitely
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
#include<stdio.h>
void main() {
int num = 0;
do {
- - num;
printf(“%d”, num);
num ++;
}
while(num >= 0);
}
6.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What is the value of ‘grade’ after the switch statement is executed?
#include<stdio.h>
int marks = 80;
switch(marks) {
case 60:
grade = ‘C’;
break;
case 70:
grade = ‘B’;
break;
case 80:
grade = ‘A’;
break;
default:
grade = ‘E’;
7.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
If switch feature is used, then
Default case must be present
Default case, if used, should be the last case
Default case, if used, can be placed anywhere
None of the above
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
CAO M3

Quiz
•
University
24 questions
Algorithm Analysis and Design

Quiz
•
University
20 questions
Understanding DBMS Keys and Constraints

Quiz
•
University
20 questions
Session6

Quiz
•
University
25 questions
PLTW Robotics Final Exam

Quiz
•
8th Grade - University
23 questions
DhsfoaoiHSJDlkdfadgsa

Quiz
•
University
20 questions
Refactorización

Quiz
•
University
20 questions
Quiz Pemrograman Arduino

Quiz
•
11th Grade - University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Engineering
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
36 questions
Unit 5 Key Terms

Quiz
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
15 questions
Properties of Equality

Quiz
•
8th Grade - University
38 questions
WH - Unit 3 Exam Review*

Quiz
•
10th Grade - University
21 questions
Advise vs. Advice

Quiz
•
6th Grade - University
12 questions
Reading a ruler!

Quiz
•
9th Grade - University