In the following control structure which is faster?
1.Switch
2.If-else
and which consumes more memory?
Answer Posted / battini.laxman
switch is faster because when in nested if condition has to
check for each time. where as in switch it diectly check
only labels.
| Is This Answer Correct ? | 8 Yes | 1 No |
Post New Answer View All Answers
Why is c known as a mother language?
1.int a=10; 2.int b=20; 3. //write here 4.b=30; Write code at line 3 so that when the value of b is changed variable a should automatically change with same value as b. 5.
Explain the difference between malloc() and calloc() function?
what is the function of pragma directive in c?
how do you execute a c program in unix.
Write a C program to accept a matrix of any size. Find the frequency count of each element in the matrix and positions in which they appear in the matrix
Why does everyone say not to use scanf? What should I use instead?
explain what are actual arguments?
Explain how can I open a file so that other programs can update it at the same time?
What is the difference between memcpy and memmove?
What are the basic data types associated with c?
Once I have used freopen, how can I get the original stdout (or stdin) back?
in multiple branching construct "default" case is a) optional b) compulsarily c) it is not include in this construct d) none of the above
What language is windows 1.0 written?
Is main an identifier in c?