Java C Control Statement Quiz 1 | Java C Control Question and Answers
Finish Quiz
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
Java C Control Statement Quiz 1 | Java C Control Question and Answers. Test your java fundamentals with our Free Java C Control Stmt. online test. Java C Control Statement Quiz 1 Question and Answers 2024. Take our free Java online Test Quiz 1 via online mode. Java C Control Stmt. Quiz 1 Free Mock Test 2024. Java C Control Stmt. Quiz 1 Question and Answers in PDF. The Java online mock test paper is free for all students. Spring Online is very useful for exam preparation and getting for Rank. Java C Control Stmt. Quiz 1 Question and Answers in English. Java C Control Stmt. Mock test for topic via C Control Stmt. Mode. Here we are providing Java C Control Stmt. Quiz in English Now Test your self for “C Control Stmt. Online Quiz in English” Exam by using below quiz…
This paper has 20 questions.
Time allowed is 25 minutes.
The Java C Control Stmt. Mock Test is Very helpful for all students. Now Scroll down below n click on “Start Quiz” or “Start Test” and Test yourself.
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
0 of 20 questions answered correctly
Your time:
Time has elapsed
You have reached 0 of 0 points, (0)
Average score |
|
Your score |
|
Categories
- Not categorized 0%
Pos. | Name | Entered on | Points | Result |
---|---|---|---|---|
Table is loading | ||||
No data available | ||||
- 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
How many times is a do while loop guaranteed to loop?
Correct
Incorrect
-
Question 2 of 20
2. Question
Which of the following is the boolean operator for logical-and?
Correct
Incorrect
-
Question 3 of 20
3. Question
When does the code block following while(x<100) execute?
Correct
Incorrect
-
Question 4 of 20
4. Question
Evaluate !(1 && !(0 || 1)).
Correct
Incorrect
-
Question 5 of 20
5. Question
What is the final value of x when the code
int x;
for(x=0; x<10; x++) {}
is run?Correct
Incorrect
-
Question 6 of 20
6. Question
Which is not a loop structure?
Correct
Incorrect
-
Question 7 of 20
7. Question
Which of the following statements are correct about the below program?
#include<stdio.h>
int main()
{
int i = 10, j = 20;
if(i = 5) && if(j = 10)
printf(“Have a nice day”);
return 0;
}Correct
“Expression syntax” error occur in this line if(i = 5) && if(j = 10).
It should be like if((i == 5) && (j == 10)).Incorrect
“Expression syntax” error occur in this line if(i = 5) && if(j = 10).
It should be like if((i == 5) && (j == 10)). -
Question 8 of 20
8. Question
Which of the following represents true condition?
Correct
Incorrect
-
Question 9 of 20
9. Question
Which of the following statements are correct about the below program?
#include<stdio.h>
int main()
{
int i = 10, j = 15;
if(i % 2 = j % 3)
printf(“ASTIWZ”);
return 0;
}Correct
if(i % 2 = j % 3) This statement generates “LValue required error”. There is no variable on the left side of the expression to assign (j % 3).
Incorrect
if(i % 2 = j % 3) This statement generates “LValue required error”. There is no variable on the left side of the expression to assign (j % 3).
-
Question 10 of 20
10. Question
Which of the following shows the correct syntax for an if statement?
Correct
Incorrect
-
Question 11 of 20
11. Question
Which follows the case statement?
Correct
Incorrect
-
Question 12 of 20
12. Question
Which of the following sentences are correct about a for loop in a C program?
1: for loop works faster than a while loop.
2: All things that can be done using a for loop can also be done using a while loop.
3: for(;;); implements an infinite loop.
4: for loop can be used if we want statements in a loop get executed at least once.Correct
Incorrect
-
Question 13 of 20
13. Question
What keyword covers unhandled possibilities?
Correct
Incorrect
-
Question 14 of 20
14. Question
What is the result of the following code?
int x=0;switch(x)
{
case 1: cout<<“One”;
case 0: cout<<“Zero”;
case 2: cout<<“Hello World”;
}
Correct
Incorrect
-
Question 15 of 20
15. Question
Which of the following statements are correct about the program?
#include<stdio.h>
int main()
{
int x = 30, y = 40;
if(x == y)
printf(“x is equal to y”);else if(x > y)
printf(“x is greater than y”);else if(x < y)
printf(“x is less than y”)
return 0;
}Correct
This program will result in error “Statement missing ;”
printf(“x is less than y”) here ; is added to the end of this statement.Incorrect
This program will result in error “Statement missing ;”
printf(“x is less than y”) here ; is added to the end of this statement. -
Question 16 of 20
16. Question
Point out the correct statements are correct about the program below?
#include<stdio.h>
int main()
{
char ch;
while(x=0;x<=255;x++)
printf(“ASCII value of %d character %c”, x, x);
return 0;
}Correct
Incorrect
-
Question 17 of 20
17. Question
What is required to avoid falling through from one case to the next?
Correct
Incorrect
-
Question 18 of 20
18. Question
Which of the following statements are correct about the below program?
#include<stdio.h>
int main()
{
int n = 0, y = 1;
y == 1 ? n=0 : n=1;
if(n)
printf(“Yes”);
else
printf(“No”);
return 0;
}Correct
Incorrect
-
Question 19 of 20
19. Question
Which of the following statements are correct about an if-else statements in a C-program?
1: Every if-else statement can be replaced by an equivalent statements using ? ; operators
2: Nested if-else statements are allowed.
3: Multiple statements in an if block are allowed.
4: Multiple statements in an else block are allowed.Correct
Incorrect
-
Question 20 of 20
20. Question
Which of the following sentences are correct about a switch loop in a C program?
1: switch is useful when we wish to check the value of variable against a particular set of values.
2: switch is useful when we wish to check whether a value falls in different ranges.
3: Compiler implements a jump table for cases used in switch.
4: It is not necessary to use a break in every switch statement.Correct
Incorrect