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

Answer Posted / sherin

There are some things that you simply cannot do with a
switch. These are:
A float expression cannot be tested using a switch
Cases can never have variable expressions (for example it is
wrong to say case a +3 : )
Multiple cases cannot use same expressions.

Is This Answer Correct ?    17 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the time and space complexities of merge sort and when is it preferred over quick sort?

665


Sir i need notes for structure,functions,pointers in c language can you help me please

1938


What is a spanning Tree?

938


How can I swap two values without using a temporary?

603


Explain what is a stream?

600






Write a function that will take in a phone number and output all possible alphabetical combinations

590


List the difference between a "copy constructor" and a "assignment operator"?

574


How many types of errors are there in c language? Explain

560


Explain the properties of union.

602


console I/O functions means a) the I/O operations done on disk b) the I/O operations done in all parts c) the input given through keyboard is displayed VDU screen d) none of the above

645


What is identifier in c?

535


1.int a=10; 2.int b=20; 3. //write here 4.b=30; Write code at line 3 so that when the value of b is changed variable a should automatically change with same value as b. 5.

1650


Explain the use of bit fieild.

701


what is event driven software and what is procedural driven software?

2003


GIven a sequence of characters. How will you convert the lower case characters to upper case characters. ( Try using bit vector - sol given in the C lib -> typec.h)

675