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


Please Help Members By Posting Answers For Below Questions

What is dynamic dispatch in c++?

552


pierrot's divisor program using c or c++ code

1724


What are the 3 types of structures?

568


What is the difference between malloc() and calloc() function in c language?

596


 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.

1722






Explain threaded binary trees?

670


What are the keywords in c?

638


What does != Mean in c?

582


What math functions are available for integers? For floating point?

616


1234554321 1234 4321 123 321 12 21 1 1 12 21 123 321 1234 4321 1234554321

3136


What is the full form of getch?

580


Is it better to use a macro or a function?

649


What is the difference between far and near ?

678


How many main () function we can have in a project?

608


What is the condition that is applied with ?: Operator?

655