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);
}
Answers were Sorted based on User's Feedback
Answer / dishank
darpan can u plz explain me how does the answer AB comes...
| Is This Answer Correct ? | 0 Yes | 2 No |
Answer / 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 |
how to find greatet of 10 numbers without using array?
When should structures be passed by values or by references?
print the following using nested for loop. 5 4 3 2 1 1 2 3 4 3 2 1 1 2 1 2 1 1 2 3 4 3 2 1 1 2 3 4 5
What is union and structure in c?
what is the difference between strcpy() and memcpy() function?
How to add two numbers without using semicolon n c????
What is the use of pointers in C?
0 Answers Impetus, Motorola, Tavant Technologies, Virtusa,
what is the difference between %d and %*d in c languaga?
How pointer is different from array?
When can a far pointer be used?
How can this be legal c?
write a program to remove duplicate from an ordered char array? in c