main()
{
char as[] = "\\0\0";
int i = 0;
do{
switch( as[i++]) {case '\\' : printf("A");
break;
case 0 : printf("B");
break;
default : printf("C");
break;
}}
while(i<3);
}
Answer Posted / lakshman
ABC is correct answer, because in first condition switch(0)=\ then it prints the character "A" ,then its break. in next condition switch(1)=0 then its prints the character "B" . In final condition switch(2)= ,it does not match any case value so default condition is executed that means character "C" will print, so the final answer is ABC
| Is This Answer Correct ? | 2 Yes | 5 No |
Post New Answer View All Answers
What is the concatenation operator?
pierrot's divisor program using c or c++ code
What is a loop?
What is the value of h?
What is a stream?
What is a function in c?
What is extern c used for?
Explain the difference between the local variable and global variable in c?
write a C program: To recognize date of any format even formats like "feb-02-2003","02-february-2003",mm/dd/yy, dd/mm/yy and display it as mm/dd/yy.
What is nested structure in c?
how many errors in c explain deply
What are directives in c?
What are reserved words?
What is modifier & how many types of modifiers available in c?
What does #pragma once mean?