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 do you mean by dynamic memory allocation in c?

637


i have to apply for rbi before that i need to know the the syllabus for the entrance questions. whethet it may be aps or techinical

1823


What are the advantages of Macro over function?

1178


What is oops c?

596


What does the file stdio.h contain?

595






Explain how do you determine a file’s attributes?

584


Is file a keyword in c?

492


What is enumerated data type in c?

611


What is meant by errors and debugging?

637


What is the auto keyword good for?

612


What are the 4 types of unions?

594


What is the use of ?: Operator?

655


What is assignment operator?

616


What is variable and explain rules to declare variable in c?

543


Apart from dennis ritchie who the other person who contributed in design of c language.

795