Академический Документы
Профессиональный Документы
Культура Документы
Objective
1. Rewrite the following code using one if statement.____________________________
If(achar==’E’)
C++;
If(achar==’E’)
Printf(“ the value is E\n”);
2. The value that follows the keyword CASE may only be_________________
3. The statement which is used to terminate the control from the loop is_____________
void main()
{
if(printf("cquestionbank"))
printf("I know c");
else
printf("I know c++");
}
6. ________________is the output of the following code
#include<stdio.h>
void main(){
int i=0;
if(i==0){
i=((5,(i=3)),i=1);
printf("%d",i);
}
else
printf("equal");
}
9. The loop in which the statements within the loop are executed at least once is called____-___
10. Which keyword is used to come out of a loop only for that iteration is__________________?
11. ____________is The output of the code below is
#include <stdio.h>
int x;
void main()
{
if (x)
printf("hi");
else
printf("how are u");
}
12. Comment on the following code below___________________
#include <stdio.h>
void main()
{
int x = 5;
if (true);
printf("hello");
}
13. The output of the code below is______________________
#include <stdio.h>
void main()
{
int x = 0;
if (x == 0)
printf("hi");
else
printf("how are u");
printf("hello");
}
14. The output of the code below is_________________
#include <stdio.h>
void main()
{
int x = 5;
if (x < 1);
printf("Hello");
}
15. The output of the code below is_________________
#include <stdio.h>
int main()
{
int i = 3;
switch (i)
{
case 0+1: printf("Geeks");
break;
case 1+2: printf("Quiz");
break;
default: printf("GeeksQuiz");
}
return 0;
}