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 the auto keyword good for?
What is c method?
What is the function of multilevel pointer in c?
Write the control statements in C language
What do you mean by command line argument?
Why doesnt long int work?
What are the features of c language?
a program that can input number of records and can view it again the record
Explain what is wrong with this program statement?
what is the c source code for the below output? 5555555555 4444 4444 333 333 22 22 1 1 22 22 333 333 4444 4444 5555555555
Explain a pre-processor and its advantages.
Why do we use namespace feature?
Explain enumerated types in c language?
What is c mainly used for?
What is the use of linkage in c language?