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 |
Is c weakly typed?
main() { int a = 65; printf(“%d %o %x”,a,a,a); } Output 65 101 41 Please explain me.How it is coming like that?
How do you write a program which produces its own source code as output?
why programs in c are running with out #include<stdio.h>? some warnings are display in terminal but we execute the program we get answer why? eg: main() { printf("hello world "); }
how to display 2-D array elements in spiral
What are the benefits of c language?
What is the output of the following program #include<stdio.h> main() { int i=0; fork(); printf("%d",i++); fork(); printf("%d",i++); fork(); wait(); }
What is pass by reference in c?
how to add two numbers without using arithmetic operators?
Define a structure to store the record of library. The record must consist of at least following fields: Title, Author, Edition, Price, Publisher, and Category. -Define functions authorSearch ( ), TitleSearch ( ) and CategorySearch ( ) to search a book with respect to author, title and category. [There can be more than one book, written by one author, in one category]
c program to manipulate x=1!+2!+3!+...+n! using recursion
Can an array be an Ivalue?