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 |
If an old women's age is the same as her three grand daughters i,mean the number of days old child=the no of weeks old child=no of months old child .The total yrs of all these ppl is 114 yrs...then how old is the old woman? the yr has 365 days..and 30 days each month.
How do we print only part of a string in c?
in case any function return float value we must declare a) the function must be declared as 'float' in main() as well b) the function automatically returned float values c) function before declared 'float' keyword d) all the above
Is there a way to jump out of a function or functions?
Write a C program to fill a rectangle using window scrolling
swap two integer variables without using a third temporary variable?
Given an array of numbers, except for one number all the others occur twice. Give an algorithm to find that number which occurs only once in the array.
Explain what are the advantages and disadvantages of a heap?
How many parameters should a function have?
pierrot's divisor program using c or c++ code
What is a floating point in c?
for(i=0;i=printf("Hello");i++); printf("Hello"); how many times how will be printed?????????