Which of the following cannot be checked in a switch-case statement?
Answer: C
No answer description available for this question.
Enter details here
How many times the while loop will get executed if a short int is 2 byte wide?
#include
int main()
{
int j=1;
while(j <= 255)
{
printf("%c %d\n", j, j);
j++;
}
return 0;
}
Answer: B
No answer description available for this question.
Enter details here
What is the output of this C code?
void main()
{
int k;
for (k = -3; k < -5; k++)
printf("Hello");
}
Answer: D
No answer description available for this question.
Enter details here
What is the output of the following C code?
#include
int main()
{
int index;
for(index=1; index<=5; index++)
{
printf("%d", index);
if (index==3)
continue;
}
}
Answer: B
No answer description available for this question.
Enter details here
A char variable can store either an ASCII character or a Unicode character.
Answer: A
No answer description available for this question.
Enter details here
A short integer is at least 16 bits wide and a long integer is at least 32 bits wide.
Answer: A
No answer description available for this question.
Enter details here
#include
int i;
int main()
{
if (i);
else
printf("Ëlse");
return 0;
}
What is correct about the above program?
Answer: B
No answer description available for this question.
Enter details here
Output?
#include
int main()
{
int c = 5, no = 10;
do {
no /= c;
} while(c--);
printf ("%dn", no);
return 0;
}
Answer: B
No answer description available for this question.
Enter details here
What is the output of the below program?
#include
int main()
{
int i = 0;
switch (i)
{
case '0': printf("Geeks");
break;
case '1': printf("Quiz");
break;
default: printf("GeeksQuiz");
}
return 0;
}
Answer: C
No answer description available for this question.
Enter details here
When 2 is entered, The output of the code below is?
#include
void main()
{
int ch;
printf("enter a value btw 1 to 2:");
scanf("%d", &ch);
switch (ch)
{
case 1:
printf("1\n");
break;
printf("Hi");
default:
printf("2\n");
}
}
Answer: D
No answer description available for this question.
Enter details here