{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Programming Midterm

Checks whether a character is numeric character0 9 or

Info iconThis preview shows pages 2–3. Sign up to view the full content.

View Full Document Right Arrow Icon
checks whether a character is numeric character(0-9) or not. 10. What is the switch structure? switch case statements are a substitute for long if statements that compare a variable to several "integral" values ("integral" values are simply values that can be expressed as an integer, such as the value of a char). The basic format for using switch case is outlined below. The value of the variable given into switch is compared to the value following each of the cases, and when one value matches the value of the variable, the computer continues executing the program from that point. 11. What is a while loop? its functionality is simply to repeat statement while the condition set in expression is true. 12. What is a do while loop? Its functionality is exactly the same as the while loop, except that condition in the do-while loop is evaluated after the execution of statement instead of before, granting at least one execution of statement even if condition is never fulfilled . 13. What is a for loop? its main function is to repeat statement while condition remains true, like the while loop. But in addition, the for loop provides specific locations to contain an initialization statement and an increase statement. So this
Background image of page 2

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page2 / 4

checks whether a character is numeric character0 9 or not...

This preview shows document pages 2 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon bookmark
Ask a homework question - tutors are online