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

can anyone please tell me wat is backlogs... i was looking for the job openings where i read this.. eligibility criteria minimum 70% in degree without backlogs. is that arrear.. if so is it standing arrear or history of arrears... please help me...

11 Answers   CTS, Indian Navy, L&T, Microsoft, SSB, TCE, TCS,


Write a c program to demonstrate Type casting in c?

2 Answers  


What is a function in c?

0 Answers  


Explain can static variables be declared in a header file?

0 Answers  


Discuss similarities and differences of Multiprogramming OS and multiprocessing OS?

4 Answers   TCS,






Differentiate between null and void pointers.

0 Answers   TCS,


What is the difference between getch() and getche()?

1 Answers   NSPL,


What is false about the following A compound statement is a.A set of simple statments b.Demarcated on either side by curly brackets c.Can be used in place of simple statement d.A C function is not a compound statement.

5 Answers   CCEM, TCS,


How will you allocate memory to double a pointer?

1 Answers  


How do you view the path?

0 Answers  


wtite a program that will multiply two integers in recursion function

4 Answers   TCS,


Is it possible to use curly brackets ({}) to enclose single line code in c program?

0 Answers  


Categories