
C Basics_1
Quiz
•
Other
•
University
•
Practice Problem
•
Hard
Navabarathy M
Used 3+ times
FREE Resource
Enhance your content in a minute
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
#include <stdio.h>
int main()
{
int a[]={1,2,3,4,5};
int sum=0,i;
for(i=1;i<6;i++)
{
int s=10;
sum=sum+s+a[i];
printf("%d\n",s);
}
printf("%d",sum);
return 0;
}
10
11
Error
12
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output for the given program?
#include <stdio.h>
void main()
{
int a=18,b=1,c;
a=a>>3;
c=b+a;
printf("%d%d",a,c);
b=a^c;
printf("%d",b);
}
123
231
213
124
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
#include <stdio.h>
void main()
{
int a=10,b=15,c=12,d;
d=(a+b+c)/3;
d==b?printf("1"):printf("2");
a+=d;
c%=a;
printf("%d%d",a,c);
}
22212
22222
22201
22202
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the program?
#include <stdio.h>
int main()
{
int n[]={1,2,3,4,5};
printf("%d,%d", n[-10],n[-20]);
return 0;
}
Error
0,0 or Garbage Value, Garbage Value.
0,-1
None of these
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the program?
#include <stdio.h>
int main()
{
int c[20]={10,20,30,40,50,60};
printf("%d", 2[c]);
return 0;
}
Error
30
20
None of these
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
#include<stdio.h>
int main()
{
int a[] = {5, 1, 15, 20, 25};
int i, j, m;
i = ++a[1];
j = a[1]++;
m = a[i++];
printf("%d, %d, %d", i, j, m);
return 0;
}
2, 1, 15
1, 2, 5
3, 2, 15
2, 3, 20
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Trace the below code:
#include<stdio.h>
#include<string.h>
int main()
{
char p[] = "zingping";
char t;
int i, j;
for(i=0,j=strlen(p)-1; i<j; i++)
{
t = p[i];
p[i] = p[j-i];
p[j-i] = t;
}
printf("%s", p);
}
pingzing
Nothing is printed on the screen
zingping
gingpinz
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
14 questions
cuestionario inclusiva lab. 2 2121
Quiz
•
University
10 questions
Ice Breaking Quiz MPP
Quiz
•
University
15 questions
Història de l'Infermeria
Quiz
•
University
10 questions
Exoictic cars.
Quiz
•
5th Grade - Professio...
10 questions
Capital Budgeting and Capital Ratioining Quiz
Quiz
•
University
15 questions
Week 3 - Quiz
Quiz
•
University
20 questions
Rabelais Gargantua chapitres XLI- L
Quiz
•
10th Grade - University
15 questions
Clase publica A/C Entrenando tu mente 2 28-08-2023
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
Discover more resources for Other
7 questions
How James Brown Invented Funk
Interactive video
•
10th Grade - University
5 questions
Helping Build the Internet: Valerie Thomas | Great Minds
Interactive video
•
11th Grade - University
12 questions
IREAD Week 4 - Review
Quiz
•
3rd Grade - University
23 questions
Subject Verb Agreement
Quiz
•
9th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
19 questions
Review2-TEACHER
Quiz
•
University
15 questions
Pre2_STUDENT
Quiz
•
University
20 questions
Ch. 7 Quadrilateral Quiz Review
Quiz
•
KG - University
