what is the different between if-else and switch statment
(other than syntax)

Answer Posted / girish patidar

switch can't check all cases but goto directly
on the perticular case but if checkes all case and verify
condition then execute.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

.find the output of the following program? char*myfunc(char*ptr) { ptr +=3; return (ptr); } int main() { char*x,*y; x="HELLO"; y=myfunc(x); printf("y = %s ",y); return 0; }

2005


pierrot's divisor program using c or c++ code

1735


What is %lu in c?

691


I came across some code that puts a (void) cast before each call to printf. Why?

685


What is wrong in this statement?

608






Are c and c++ the same?

629


What is return type in c?

646


What is the use of #define preprocessor in c?

623


Is main is user defined function?

601


What are header files in c programming?

660


Why malloc is faster than calloc?

594


What is nested structure with example?

631


What is a protocol in c?

561


What is the function of volatile in c language?

670


What is #define used for in c?

618