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 ?    5 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 1 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 ?    0 Yes 1 No




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

Answer / darpan

AB

Is This Answer Correct ?    0 Yes 4 No

Post New Answer



More C Interview Questions

Why does not use getgh(); and <conio.h> in c language.

3 Answers   Elofic,


how to find greatet of 10 numbers without using array?

4 Answers  


main() { int i = 10; printf(" %d %d %d \n", ++i, i++, ++i); }

8 Answers   TCS, Vector,


how to find turn around time in operating system?

3 Answers  


When you call malloc() to allocate memory for a local pointer, do you have to explicitly free() it?

2 Answers   Aloha Technology,






what is the difference between call by value and call by reference?

5 Answers   Infosys,


A.C func() { pritnf(" in fuction %d",MACRO); } MAIN.c testfunc() { #define MACRO 10 printf("in test function %d", MACRO); } main() { printf("in main %d",MACRO); func(); testfunc(); getch(); }

2 Answers   Wipro,


main() { int l=6; switch(l) { default:l=l+2; case 4:l=4; case 5:l++; break; } printf("%d",l); }

1 Answers  


how many times does the loop iterated ? for (i=0;i=10;i+=2) printf("Hi\n");

9 Answers   TCS,


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

0 Answers   TCS,


Identify the operators that is not used with pointer a. && b. # c. * d. >>

2 Answers  


i have to apply for the rbi for the post of officers. i need to know abt the entrance questions whether it may be aps or techinical....

0 Answers   RBI,






Categories