
C Programming Quiz-1

Quiz
•
Computers
•
University
•
Hard
Baburaj KV
Used 5+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What will be the output of following program ?
#include <stdio.h>
void main() {
printf("Hello "World"\n");
}
Hello “World”
Hello
error
none of above
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What will be the output of following program ?
#include <stdio.h>
void main() {
printf("Hello\rWorld\n");
}
HelloWorld
Hello World
Hello
World
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What will be output of the following program ?
#include <stdio.h>
void main() {
int i=1, j=2;
printf("%d\t%d\t%d\n", (++i+j++), i, j);
}
5 2 2
4 2 2
4 2 3
syntax error
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What will be the output of the following program?
#include <stdio.h>
void main() {
if(1 || 0)
printf("true");
else
printf("false");
}
true
false
error
none of above
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Predict output of the following program
#include <stdio.h>
void main() {
int i, j;
for(i=1;i<=5;i++) {
for(j=1;j<=5;j++); {
if(i==j)
printf("%d\t%d\t", i, j);
}
}
}
1 1 2 2 3 3 4 4 5 5
6 6
no output
syntax error
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What will be the output of the following program?
#include <stdio.h>
void main() {
int i, n=5;
for(i=1; i<=n;i++) {
printf("%d", n/(n-i));
}
}
1 1 2 5
no output
infinite loop
error
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which of the following program generates sequence ‘1 2 3 4’ ?
#include <stdio.h>
void main() {
for(int i=1; i<=5;i++) {
if(i==5)
break;
printf("%d\t", i);
}
}
#include <stdio.h>
void main() {
for(int i=1; i<=5;i++); {
if(i==5)
continue;
printf("%d\t", i);
}
}
both a) and b)
none of above
Create a free account and access millions of resources
Similar Resources on Wayground
13 questions
#include <\c>

Quiz
•
University
10 questions
C Programming Quiz-1

Quiz
•
University
15 questions
C programming

Quiz
•
University
10 questions
C Programming - Basics 001

Quiz
•
University
15 questions
Milking Minds 2 17-01-24

Quiz
•
University
10 questions
POINTERS

Quiz
•
University
15 questions
C Pointers 17May2023

Quiz
•
University
10 questions
Beyond the classroom

Quiz
•
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 Computers
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