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’s a signal? Explain what do I use signals for?
how to capitalise first letter of each word in a given string?
What are actual arguments?
What is the 'named constructor idiom'?
What is the difference between declaring a variable by constant keyword and #define ing that variable?
What does emoji p mean?
How do I copy files?
Not all reserved words are written in lowercase. TRUE or FALSE?
Write a code to generate divisors of an integer?
What is %g in c?
Can a file other than a .h file be included with #include?
List the difference between a "copy constructor" and a "assignment operator"?
What is the need of structure in c?
What is the advantage of c?
What is variable declaration and definition in c?