Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Answer Posted / nilesh dinakr

In IF STATEMENT, we can build the logical conditin i.e.
usinf realtional operator but in SWITCH, we can use the
expression which yield int or char value but not float.
char value will be auoto typecast to int. shortly , switch
works only one int

Is This Answer Correct ?    4 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does void main return?

1130


What is the newline escape sequence?

1078


Why we use stdio h in c?

1041


What is a void pointer in c?

1114


How can I generate floating-point random numbers?

1134


Given only putchar (no sprintf, itoa, etc.) write a routine putlong that prints out an unsigned long in decimal. [ I gave the obvious solution of taking % 10 and / 10, which gives us the decimal value in reverse order. This requires an array since we need to print it out in the correct order. The interviewer wasn't too pleased and asked me to give a solution which didn't need the array ].

1097


What is the difference between if else and switchstatement

1940


What is #include stdio h and #include conio h?

1114


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

1056


Write a program to swap two numbers without using the third variable?

1078


Is null a keyword in c?

1200


List the difference between a While & Do While loops?

1113


what is a constant pointer in C

1186


Explain how do you determine the length of a string value that was stored in a variable?

1158


What is the c value paradox and how is it explained?

1062