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 the processor registers can be used in C ?
how to generate the length of a string without using len funtion?
Why is malloc used?
How can you determine the maximum value that a numeric variable can hold?
void main() { for(; 0 ;) ... { printf("hello"); ... } getch(); }
What has to put when we are inserting as assembly language code into the C code? or When we are inserting as assembly language code into the C code we have to insert one thing at the start and of the assembly language. What are they?
what information does the header files contain?
6 Answers BSNL, Cisco, GDA Technologies,
What is the output from this program? #include <stdio.h> void do_something(int *thisp, int that) { int the_other; the_other = 5; that = 2 + the_other; *thisp = the_other * that; } int main(void) { int first, second; first = 1; second = 2; do_something(&second, first); printf("%4d%4d\n", first, second); return 0; }
1 1 2 1 2 3 1 2 3 4 1 2 3 1 2 1 generate this output using for loop
I need to take a sentence from input and sort the words alphabetically using the C programming language. Note: This is C not C++. qsort and strtok not allowed
1.)how to find d most repeated word in a string? string ="how do you do"?? output should be do
1 Answers AAS, Nagarro, Vuram,
write a “Hello World” program in “c” without using a semicolon?