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
Answer / dishank
darpan can u plz explain me how does the answer AB comes...
Is This Answer Correct ? | 0 Yes | 2 No |
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 |
Explain how can you avoid including a header more than once?
Explain what is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?
How. To pass the entrance test
if ENTERED FIVE DIGITS DESIGN A PROGRAM THAT WILL FIND CORRESPONDING VALUE FROM ASCII TABLE
What is the use of the function in c?
Can you apply link and association interchangeably?
Explain what’s a signal? Explain what do I use signals for?
Explain Function Pointer?
write program on arrays
Why is c so powerful?
Taking an example,differentiate b/w loader and linker ?
Why do we write return 0 in c?