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

will u please send me the placement papers to my mail???????????????????

1631


What is else if ladder?

809


1) write a program to generate 1st n fibonacci prime numbers using Nested if 2) write a program to generate twin prime numbers from m to n using nested if 3) write a program to check whether a given integer is a strong number or not using nested if 4) Write a program to generate prime factors of a given integer using nested if 5)write a program to generate prime numbers from m to n using nested if 6)write a program to generate perfect numbers from m to n using nested if 7)write a program to generate the pallindromes from m to n using neste if 8)write a program to generate armstrong numbers from m to n using nested if 9)write a program to generate strong numbers from m to n using nested if

4238


What is #line used for?

803


Device an algorithm for weiler-atherton polygon clipping, where the clipping window can be any specified polygon

5720


What is the difference between typedef and #define?

769


List the different types of c tokens?

851


What is bin sh c?

789


What is a static function in c?

863


What is the difference between mpi and openmp?

1017


How can you pass an array to a function by value?

847


What is the difference between abs() and fabs() functions?

874


How can you avoid including a header more than once?

760


Create a structure to specify data on students given below: Roll number, Name, Department, Course, Year of joining Assume that there are not more than 450 students in the college. 1.write a function to print names of all students who joined in a particular year 2.write a function to print the data of a student whose roll number is given

2826


Explain how can you tell whether a program was compiled using c versus c++?

814