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);
}

Answers were Sorted based on User's Feedback



main() { char as[] = "\\0\0"; int i = 0; do{ switch( as[i++]) {case '\\' : ..

Answer / srikanth

ACB

Is This Answer Correct ?    18 Yes 1 No

main() { char as[] = "\\0\0"; int i = 0; do{ switch( as[i++]) {case '\\' : ..

Answer / dishank

darpan can u plz explain me how does the answer AB comes...

Is This Answer Correct ?    0 Yes 2 No

main() { char as[] = "\\0\0"; int i = 0; do{ switch( as[i++]) {case '\\' : ..

Answer / 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

main() { char as[] = "\\0\0"; int i = 0; do{ switch( as[i++]) {case '\\' : ..

Answer / darpan

AB

Is This Answer Correct ?    0 Yes 5 No

Post New Answer

More C Interview Questions

How can I call system when parameters (filenames, etc.) Of the executed command arent known until run time?

0 Answers  


hw can we delete an internal node of binary search tree the internal node has child node..plz write progarm

0 Answers   TCS,


What are global variables and explain how do you declare them?

0 Answers  


Does c have class?

0 Answers  


Why static variable is used in c?

0 Answers  


Is boolean a datatype in c?

0 Answers  


What does *p++ do? What does it point to?

0 Answers  


1 1 12 21 123 321 12344231 how i creat it with for loop??

1 Answers  


Give me basis knowledge of c , c++...

5 Answers  


What are the 3 types of structures?

0 Answers  


what is ur strangth & weekness

0 Answers   Cognizant, LG Soft, NetEnrich,


what is develop in c language

2 Answers  


Categories