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

Answer Posted / thiyagu.p

Simply saying, IF-ELSE can have values based on constraints
where SWITCH can have values based on user choice.

Is This Answer Correct ?    187 Yes 42 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does node * mean?

968


write a program to input 10 strings and compare without using strcmp() function. If the character of one string matches with the characters of another string , sort them and make it a single string ??? example:- str1="Aakash" st2="Himanshu" str="Uday" output:- Aakashimanshuday (please post the answer as quickly as possible)

1889


An integer that indentifies the position of a data item in a sequence of data items a) value b) number c) index d) all of the above

932


Can main () be called recursively?

889


What is the use of extern in c?

850


What is an array in c?

796


Is null always equal to 0(zero)?

799


What is conio h in c?

818


What is the use of typedef in structure in c?

728


what is use of malloc and calloc?

1679


What is c token?

832


If one class contains another class as a member, in what order are the two class constructors called a) Constructor for the member class is called first b) Constructor for the member class is called second c) Only one of the constructors is called d) all of the above

840


What is the scope of global variable in c?

763


Which is not valid in C a) class aClass{public:int x;}; b) /* A comment */ c) char x=12;

847


Is c pass by value or reference?

820