what is the different between if-else and switch statment
(other than syntax)
Answer Posted / vikky
expressions cannot be used as arguments in switsh, but in
if else any kind of exp can be used...
in the case of checkin a single variable for several values
SWITCH is the BEST.
in all other cases if else holds gud.
| Is This Answer Correct ? | 36 Yes | 20 No |
Post New Answer View All Answers
What is the difference between procedural and declarative language?
What is a macro?
a character or group of characters that defines a register,or a part of storage a) memory b) byte c) address d) linear list
Write a program to print fibonacci series using recursion?
the constant value in the case label is followed by a a) semicolon b) colon c) braces d) none of the above
Is file a keyword in c?
design and implement a data structure and performs the following operation with the help of file (included 1000 student marks in 5 sub. and %also) 1.how many students are fail in all 5 subjects (if >35) 2. delete all student data those are fail in all 5 subjects. 3. update the grace marks (5 no. if exam paper is 100 marks) 4. arrange the student data in ascending order basis of marks. 5.insert double of deleted students with marks in the list.
Explain what is operator promotion?
Want to know how to write a C program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL.
Why enum is used in c?
What are the advantages and disadvantages of pointers?
How can I swap two values without using a temporary?
Explain what are compound statements?
Explain the properties of union. What is the size of a union variable
Why string is used in c?