C-Extended
Quiz
•
Computers
•
University
•
Practice Problem
•
Hard
Niranjan C
Used 13+ times
FREE Resource
Enhance your content in a minute
16 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What will this program print?
main()
{
int i = 2;
{
int i = 4, j = 5;
printf("%d %d", i, j);
}
printf("%d %d", i, j);
}
4525
2525
4545
None of the these
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code?
int x = 5;
int y = 3;
int z = x + y;
printf("%d", z);5
15
2
8
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the result of the following expression?
int a = 10;
int b = 5;
int c = a * b + 2;
printf("%d", c);52
50
25
15
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the value of 'num' after executing the following code?
int num = 7;
num += 3;
num *= 2;
printf("%d", num);20
25
15
10
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How many times "javaTpoint" is printed?
#include<stdio.h>
int main()
{
int x;
for(x=-1; x<=10; x++)
{
if(x < 5)
continue;
else
break;
printf("javaTpoint");
}
return 0;
}
#include<stdio.h>
int main()
{
int x;
for(x=-1; x<=10; x++)
{
if(x < 5)
continue;
else
break;
printf("javaTpoint");
}
return 0;
}
0 times
12 times
11 times
Infinite times
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How many times while loop is executed if a short int is 2 byte wide?
#include<stdio.h>
int main()
{
int i=1;
while(i <= 155)
{
printf("%c %d\n", i, i);
i++;
}
return 0;
}
#include<stdio.h>
int main()
{
int i=1;
while(i <= 155)
{
printf("%c %d\n", i, i);
i++;
}
return 0;
}
154 times
155 times
156 times
Infinite times
7.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which statement is correct about the below program?
#include<stdio.h>
int main()
{
int i = 8, j = 24;
if(i = 8) && if(j = 24)
printf("Welcome Programmer");
return 0;
}
#include<stdio.h>
int main()
{
int i = 8, j = 24;
if(i = 8) && if(j = 24)
printf("Welcome Programmer");
return 0;
}
Welcome Programmer
Error: Undeclared identifier if
Error: Expression syntax
No output
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 Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
20 questions
Web Development and Programming
Quiz
•
University
12 questions
Javascript
Quiz
•
University
20 questions
IPC
Quiz
•
University
20 questions
data structures1
Quiz
•
University
16 questions
Quiz on List and Tuples
Quiz
•
University
12 questions
Intro to Scratch 2
Quiz
•
KG - University
20 questions
UTS - Struktur Data
Quiz
•
University
12 questions
Printf, scanf
Quiz
•
University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
