C Programming 4
Questions Result & StatisticsQuiz-summary
0 of 20 questions completed
Questions:
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
Information
Questions
Instruction:
- Total number of questions : 20
- Time allotted : 25 minutes.
- Each question carry 1 mark, no negative marks.
- Click the “Finish quiz” button given in bottom of this page to submit your answer.
- Test will be submitted automatically if the time expired.
- Don’t refresh the page.
You have already completed the quiz before. Hence you can not start it again.
Quiz is loading...
You must sign in or sign up to start the quiz.
You have to finish following quiz, to start this quiz:
Results
Marks : 0 of 20 questions answered correctly | ||
Total number of questions | : | 20 |
Number of currect answered | : | 0 |
Your time | : |
|
Time has elapsed
You have reached 0 of 0 points, (0)
Categories
- Not categorized 0%
-
Thank you for submitting online test!
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- Answered
- Review
-
Question 1 of 20
1. Question
1 points.
What is the output of below code ?
#include <stdio.h>
void main()
{
int x = 5;
if (x < 1)
printf(“hello”);
if (x == 5)
printf(“hi”);
else
printf(“no”);
}
CorrectAnswer : A
No Explanation
IncorrectAnswer : A
No Explanation
-
Question 2 of 20
2. Question
1 points.
What is output of the code below
#include <stdio.h>
int x;
void main()
{
if (x)
printf(“Hi”);
else
printf(“How are u”);
}
CorrectAnswer : B
No Explanation
IncorrectAnswer : B
No Explanation
-
Question 3 of 20
3. Question
1 points.
Comment on the code below
#include <stdio.h>
void main()
{
int x = 5;
if (true);
printf(“hello”);
}
CorrectAnswer : B
No Explanation
IncorrectAnswer : B
No Explanation
-
Question 4 of 20
4. Question
1 points.
What is the output of this C code?
#include <stdio.h>
int main()
{
int x = 1;
if (x > 0)
printf(“inside if\n”);
else if (x > 0)
printf(“inside elseif\n”);
}
CorrectAnswer : A
No Explanation
IncorrectAnswer : A
No Explanation
-
Question 5 of 20
5. Question
1 points.
What is the output of this C code?
#include <stdio.h>
int main()
{
int x = 0;
if (x++)
printf(“true\n”);
else if (x == 1)
printf(“false\n”);
}
CorrectAnswer : B
No Explanation
IncorrectAnswer : B
No Explanation
-
Question 6 of 20
6. Question
1 points.
What is the output of this C code?
#include <stdio.h>
int main()
{
int x = 0;
if (x == 1)
if (x == 0)
printf(“inside if\n”);
else
printf(“inside else if\n”);
else
printf(“inside else\n”);
}
CorrectAnswer : C
No Explanation
IncorrectAnswer : C
No Explanation
-
Question 7 of 20
7. Question
1 points.
What is the output of this C code?
#include <stdio.h>
int main()
{
int x = 0;
if (x == 0)
printf(“true, “);
else if (x = 10)
printf(“false, “);
printf(“%d\n”, x);
}
CorrectAnswer : B
No Explanation
IncorrectAnswer : B
No Explanation
-
Question 8 of 20
8. Question
1 points.
What is the output of this C code?
#include <stdio.h>
int main()
{
int x = 0;
if (x == 1)
if (x >= 0)
printf(“true\n”);
else
printf(“false\n”);
}
CorrectAnswer : D
No Explanation
IncorrectAnswer : D
No Explanation
-
Question 9 of 20
9. Question
1 points.
What is the output of this C code?
#include <stdio.h>
int main()
{
int a = 1;
if (a–)
printf(“True”);
if (a++)
printf(“False”);
}
CorrectAnswer : A
No Explanation
IncorrectAnswer : A
No Explanation
-
Question 10 of 20
10. Question
1 points.
Comment on the following code?
#include <stdio.h>
int main()
{
int a = 1;
if (a)
printf(“All is Well “);
printf(“I am Well\n”)
else
printf(“I am not a River\n”);
}
CorrectAnswer : D
No Explanation
IncorrectAnswer : D
No Explanation
-
Question 11 of 20
11. Question
1 points.
What is the output of this C code?
#include <stdio.h>
const int a = 1, b = 2;
int main()
{
int x = 1;
switch (x)
{
case a:
printf(“yes “);
case b:
printf(“no\n”);
break;
}
}
CorrectAnswer : D
No Explanation
IncorrectAnswer : D
No Explanation
-
Question 12 of 20
12. Question
1 points.
Comment on the output of this C code?
#include <stdio.h>
int main()
{
int a = 1;
switch (a)
case 1:
printf(“%d”, a);
case 2:
printf(“%d”, a);
case 3:
printf(“%d”, a);
default:
printf(“%d”, a);
}
CorrectAnswer : D
No Explanation
IncorrectAnswer : D
No Explanation
-
Question 13 of 20
13. Question
1 pointsCorrectAnswer : D
No Explanation
IncorrectAnswer : D
No Explanation
-
Question 14 of 20
14. Question
1 points.
Comment on the output of this C code?
#include <stdio.h>
int main()
{
int a = 1;
switch (a)
{
case a:
printf(“Case A “);
default:
printf(“Default”);
}
}
CorrectAnswer : D
No Explanation
IncorrectAnswer : D
No Explanation
-
Question 15 of 20
15. Question
1 pointsCorrectAnswer : A
No Explanation
IncorrectAnswer : A
No Explanation
-
Question 16 of 20
16. Question
1 pointsCorrectAnswer : B
No Explanation
IncorrectAnswer : B
No Explanation
-
Question 17 of 20
17. Question
1 points.
What is the output of this C code?
#include <stdio.h>
int main()
{
short i;
for (i = 1; i >= 0; i++)
printf(“%d\n”, i);
}
CorrectAnswer : C
No Explanation
IncorrectAnswer : C
No Explanation
-
Question 18 of 20
18. Question
1 points.
What is the output of this C code?
#include <stdio.h>
void main()
{
int k = 0;
for (k)
printf(“Hello”);
}
CorrectAnswer : A
No Explanation
IncorrectAnswer : A
No Explanation
-
Question 19 of 20
19. Question
1 points.
What is the output of this C code?
#include <stdio.h>
void main()
{
int k = 0;
for (k < 3; k++)
printf(“Hello”);
}
CorrectAnswer : A
No Explanation
IncorrectAnswer : A
No Explanation
-
Question 20 of 20
20. Question
1 points.
What is the output of this C code?
#include <stdio.h>
void main()
{
double k = 0;
for (k = 0.0; k < 3.0; k++)
printf(“Hello”);
}
CorrectAnswer : B
No Explanation
IncorrectAnswer : B
No Explanation