Warning: implode(): Invalid arguments passed in /www/wwwroot/jobquiz.info/mdiscuss.php on line 336
Point out the error, if any in the program. #include<stdio.h> int main() { int i = 1; switch(i) { printf("This is c program."); case 1: printf("Case1"); break; case 2: printf("Case2"); break; } return 0; } ?->(Show Answer!)
Question Set

1. Point out the error, if any in the program. #include<stdio.h> int main() { int i = 1; switch(i) { printf("This is c program."); case 1: printf("Case1"); break; case 2: printf("Case2"); break; } return 0; }





Ask Your Doubts Here

Type in
(Press Ctrl+g to toggle between English and the chosen language)

Comments

  • By: guest on 01 Jun 2017 06.01 pm
    switch(i) becomes switch(1), then the case 1: block is get executed. Hence it prints "Case1". printf("This is c program."); is ignored by the compiler. Hence there is no error and prints "Case1".
Show Similar Question And Answers
QA->Rahim travelled straight from point E to F at a distance of 5 km. From F he turned left and travelled 6 km and reached point G, there he took a left turn and travelled 5 km to reach point H. He took another left turn and travelled 2 km and reached point I. How far is he from the starting point ?....
QA->A word is given in capital letters. It is followed by four words. Out of these four words, three cannot be formed from the letters of the word in capital letters. Point out the word which can be formed from the letters of the given word in capital letters— ARCHITECTURE....
QA->A semiconductor device used to amplify or switch electronic signals and electrical . power?....
QA->Which is the time required for the Earth to return to a given point in its orbit with reference to fixed star?....
QA->Name the translatory program which translates the high level language into machine language before running the program?....
MCQ->Point out the error, if any in the program. #include<stdio.h> int main() { int i = 1; switch(i) { printf("This is c program."); case 1: printf("Case1"); break; case 2: printf("Case2"); break; } return 0; }....
MCQ->Point out the error, if any in the program. #include<stdio.h> int main() { int i = 1; switch(i) { case 1: printf("Case1"); break; case 12+4: printf("Case2"); break; } return 0; }....
MCQ->Point out the error, if any in the program. #include<stdio.h> int main() { int P = 10; switch(P) { case 10: printf("Case 1"); case 20: printf("Case 2"); break; case P: printf("Case 2"); break; } return 0; }....
MCQ->What will be the output of the program? #include<stdio.h> int i; int fun1(int); int fun2(int); int main() { extern int j; int i=3; fun1(i); printf("%d,", i); fun2(i); printf("%d", i); return 0; } int fun1(int j) { printf("%d,", ++j); return 0; } int fun2(int i) { printf("%d,", ++i); return 0; } int j=1;....
MCQ->What will be the output of the program? #include<stdio.h> int fun(int, int); typedef int (pf) (int, int); int proc(pf, int, int); int main() { printf("%d\n", proc(fun, 6, 6)); return 0; } int fun(int a, int b) { return (a==b); } int proc(pf p, int a, int b) { return ((p)(a, b)); }....
Terms And Service:We do not guarantee the accuracy of available data ..We Provide Information On Public Data.. Please consult an expert before using this data for commercial or personal use | Powered By:Omega Web Solutions
© 2002-2017 Omega Education PVT LTD...Privacy | Terms And Conditions
Question ANSWER With Solution