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 boolean in c?
Explain the difference between getch() and getche() in c?
What is pass by reference in functions?
What is variable and explain rules to declare variable in c?
How can I recover the file name given an open stream?
Write a program to implement a round robin scheduler and calculate the average waiting time.Arrival time, burst time, time quantum, and no. of processes should be the inputs.
What is the Purpose of 'extern' keyword in a function declaration?
How do I swap bytes?
Explain the advantages of using macro in c language?
Where is volatile variable stored?
What is getche() function?
What are the advantages of using Unions?
struct screen_pos{ int row, col } ;move_right(cursor)struct screen_pos *cursor;{ cursor.col++; } /* This statementhas a syntax error */What is the correct statement a) cursor.col = cursor.col + 1; b) col.cursor++; c) *cursor.col++; d) pointer
What are the functions to open and close the file in c language?
Explain the use of fflush() function?