In the following control structure which is faster?
1.Switch
2.If-else
and which consumes more memory?
Answer Posted / deepak upadhyay
switch statement is more faster and consumes less memory
than if-else statement the reason being that the switch
statement is applied when we have a single variable to
check but in case of if-else different variable may be
checked at the same time.
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
explain what is fifo?
Place the #include statement must be written in the program?
What is getche() function?
write a program to find the given number is prime or not
What are predefined functions in c?
What is sizeof int?
What is nested structure with example?
What are the characteristics of arrays in c?
Explain output of printf("Hello World"-'A'+'B'); ?
What is c definition?
Explain what is a 'locale'?
What are the loops in c?
What is the difference between null pointer and wild pointer?
Dont ansi function prototypes render lint obsolete?
Why is c called c not d or e?