Already have an account? Get multiple benefits of using own account!
Login in your account..!
Remember me
Don't have an account? Create your account in less than a minutes,
Forgot password? how can I recover my password now!
Enter right registered email to receive password!
Give the syntax switch statements
Consider the following example. This is a function which converts an integer into a vague description. It is useful where we are only concerned in measuring a quantity when it is quite small.
estimate(number)
int number;
/* Estimate a number as none, one, two, several, many */
{ switch(number) {
case 0 : printf("None\n"); break;
case 1 : printf("One\n"); break;
case 2 : printf("Two\n"); break;
case 3 : case 4 : case 5 :
printf("Several\n");
break;
default :
printf("Many\n");
}
Each interesting case is listed with a corresponding action. The break statement prevents any further statements from being executed by leaving the switch. Since case 3 and case 4 have no following break, they continue on allowing the same action for several values of number.
Both if and switch constructs allow the programmer to make a selection from a number ofpossible actions.
Q. What is Input - Output Instructions? An I/O instruction is stored in memory of computer and is fetched as well as executed by processor producing an I/O-related command for
Draw the logic diagram of 4-bit Twisted Ring counters and explain its operation with the help of timing diagram. Ans: Twisted ring counter (4 BIT): We ready know that shi
How to get an output: Please enter a number between 0 and 6 (Enter to stop): 2 The Day of Week is Tuesday Please enter a number between 0 and 6 (Enter to stop): 9 Input Invalid Ple
Conversion of decimal number 10.625 into binary number ? Ans. There is integer part is 10 and fractional part is 0.625. Firstly convert the decimal number 10 in its equal bina
1. How does this new generation of ERP products differ from traditional solutions? 2. What are the major external forces driving competition in the ERP industry? Cloud comput
What is hysteresis? Hysteresis is well known in ferromagnetic materials. When an external magnetic field is applied to a Ferro magnet, the atomic dipoles align themselves with
making a er diagram insturction
Why pointer variable sometimes desirable to pass a pointer to a function as an argument? Frequently, a called function needs to make changes to objects declared in the calling
Define word length? Every group of n bits is referred to as a word of information and n is known as the word length.
What is an unsigned integer constant? An integer constant is the number in the range of - 32768 to + 32767; because an integer constant always gets two bytes in memory and in t
Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!
whatsapp: +1-415-670-9521
Phone: +1-415-670-9521
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd