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 do you mean by dynamic memory allocation in c?
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
What are the advantages of Macro over function?
What is oops c?
What does the file stdio.h contain?
Explain how do you determine a file’s attributes?
Is file a keyword in c?
What is enumerated data type in c?
What is meant by errors and debugging?
What is the auto keyword good for?
What are the 4 types of unions?
What is the use of ?: Operator?
What is assignment operator?
What is variable and explain rules to declare variable in c?
Apart from dennis ritchie who the other person who contributed in design of c language.