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
Explain the use of fflush() function?
What is the use of bit field?
please explain every phase in the "SDLC" in the dotnet.
What are different types of pointers?
How can you find out how much memory is available?
Explain bitwise shift operators?
Which is better between malloc and calloc?
Explain indirection?
Does c have circular shift operators?
You are to write your own versions of strcpy() and strlen (). Call them mystrcpy() and mystrlen(). Write them first as code within main(), not as functions, then, convert them to functions. You will pass two arrays to the function in the case of mystrcpy(), the source and target array.
What is the scope of global variable in c?
How do you define a function?
What is array in C
What is indirection?
What are the back slash character constants or escape sequence charactersavailable in c?