A switch statement , Computer Engineering

Which is more efficient, a switch statement or an if else chain?

Ans) The differences, if any, are likely to be small. The switch statement was designed to be efficiently implementable, though the compiler may want to use the equal of an if/else chain (as opposed to a compact jump table) if the case labels are sparsely distributed.

 

 

Posted Date: 4/8/2013 3:12:34 AM | Location : United States







Related Discussions:- A switch statement , Assignment Help, Ask Question on A switch statement , Get Answer, Expert's Help, A switch statement Discussions

Write discussion on A switch statement
Your posts are moderated
Related Questions
How does electronic brokerage facilitate search and retrieval of information? E Brokerage facilitates search and retrieval of Information: The success aspect of a brokera

Define cache line. Cache block is used to refer to a set of contiguous address location of some size. Cache block is also referred to as cache line.

#write a program to find the area under the curve y=f(x) between x =a and x=b integrate the area between a and b by c programming

What is an I/O Interface? Input-output interface provides a method for transferring binary information among internal storage, like memory and CPU registers, and external I/O d

Design issues:  To complete the maximum processor utilization in a multithreaded architecture, the following design issues have to be addressed: Context Switching time: S

What are the different between Public Key Encryption and Secret Key Encryption? Differentiate between Public Key Encryption and Secret Key Encryption: A cryptographic sys

Explain briefly about GNOME desktop

LoadRunner works by making virtual users who take the place of real users operating client software, such as sending requests using the HTTP protocol to IIS or Apache web servers.

Q. Write a program to perform multiplication of two numbers in specified radix. Check that entered numbers are in specified radix or not else error message should be displayed.

Output comparators are used in  Theses are used in Dynamic testing of single and multiple module.