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 dynamic dispatch in c++?
pierrot's divisor program using c or c++ code
What are the 3 types of structures?
What is the difference between malloc() and calloc() function in c language?
write a program that will open the file, count the number of occurences of each word in the the complete works of shakespeare. You will then tabulate this information in another file.
Explain threaded binary trees?
What are the keywords in c?
What does != Mean in c?
What math functions are available for integers? For floating point?
1234554321 1234 4321 123 321 12 21 1 1 12 21 123 321 1234 4321 1234554321
What is the full form of getch?
Is it better to use a macro or a function?
What is the difference between far and near ?
How many main () function we can have in a project?
What is the condition that is applied with ?: Operator?