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 |
how to make a scientific calculater ?
give an example of type casting by a simple c program
how to add our own function in c library please give details.?
Write a program to find minimum between three no.s whithout using comparison operator.
name the language for writing c compiler?
different between overloading and overriding
writ a program to compare using strcmp VIVA and viva with its output.
What is the output of below code? main() { static in a=5; printf("%3d",a--); if(a) main(); }
Look at the Code: #include<string.h> void main() { char s1[]="abcd"; char s2[10]; char s3[]="efgh"; int i; clrscr(); i=strcmp(strcat(s3,ctrcpy(s2,s1))strcat(s3,"abcd")); printf("%d",i); } What will be the output? A)No output B) A Non Integer C)0 D) Garbage
what is the most appropriate way to write a multi-statement macro?
Ow can I insert or delete a line (or record) in the middle of a file?
Explain what are reserved words?