Question
What is a flag variable? Why would you use one? You will have several problems dealing with if/else if/else blocks of statements. You will have
What is a flag variable? Why would you use one? You will have several problems dealing with if/else if/else blocks of statements. You will have to give the output or the value of a variable after it has gone through these types of blocks. Remember that more than one statement requires {}, and also know the difference between = and ==. Be familiar with all the relational operators and what each means (<, <=, >, >=, ==,!=) Know how to convert an if/else statement into a ? : statement. Know the logical operators (&&,||,!) and their corresponding truth tables. Know that you need variable names on both sides of a logical expression. What does a switch statement do? Be able to give the output printed or the value of a variable that has gone through a switch block. Pay attention to fall through. What key word do you need to prevent fall through from occurring? What is the value of false in C++? What are the values of true? If a statement appears inside of another statement, what is the term for this? How do you check the value of a char variable using an if statement? Program Given a program, be able to fill in missing blanks with the names of header files used in Chapter 3 (string, iomanip, cmath, cstdlib), functions used in Chapter 3 (pow(), getline(), rand(), srand(), sqrt(), sin(),cos(),tan(), etc.), and key words and statements in Chapter 4 (if, else if, else, switch, case, break, default).
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started