In the following control structure which is faster?
1.Switch
2.If-else
and which consumes more memory?
Answer Posted / abhradeep chatterjee
According to me, switch is faster. cause in nested if-
else, the checking occurs in each step. So, more the
compiler checks, the more it takes time. So switch case is
faster.
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is string constants?
What are the advantages of the functions?
what is the difference between north western polytechnique university and your applied colleges?? please give ur answers for this. :)
what is recursion in C
What is far pointer in c?
write a programe to accept any two number and check the following condition using goto state ment.if a>b,print a & find whether it is even or odd and then print.and a
When should the volatile modifier be used?
How many bytes are occupied by near, far and huge pointers (dos)?
What is the best organizational structure?
Is malloc memset faster than calloc?
List some applications of c programming language?
What is putchar() function?
What do you mean by dynamic memory allocation in c? What functions are used?
Can we access array using pointer in c language?
Explain union.