An interation statement can be used to repeat statements


true or false
1. the arithmetic operator,*, and the logical operator , I I. have the same level of predence
2. the debugger with an IDE, SUCH as Dev c++, can be used to help find errors in a program
3.An interation statement can be used to repeat statements of a program
4. a missing library is a run-time (execution)error
5. keywords can have thier meanings changed by the programmer
6. all constants must be given a value at declaration time
7. identifiers in c++ are not case sensitive
8.The word case can be used as a variable name
9. the[] square braces are used to contain a compound statement
10. Initial values cannot be assigned to variables when they are declared
11. un-initialized variables contain unknown, garbage values
12. the data type of a variable is the same thing as the value of a variable
13. top down design is a process of refining tasks into subtasks until each subtask can be easily accomplished
DETERMINE WHETHER THE FOLLOWING IS A VALID OR INVALID USER-DEFINED C++ IDENTIFIER
1. char
2.oneInteger
3.#taxplan
4.M
5.4ever
DETERMINE WHEATHER THE FOLLOWING IS VALID OR INVALID CONSTANT DECLARATION
6.const string="California";
7. const MIN_VALUE=1;

DOES THE FOLLOWING EXPRESSIONS EVALUATE AS TRUE, FALSE OR INVALID
1. 28/5==26%7
2.trueIIfalse&&!true
3. !(5!=6)
4.10<5<1
5. (5<7) && (10 == 2 * 6)
If the variable myNum is declared to be a of type float, the state:cout << fixed << setprecision(1) <a. output with 5 places to the right of the decimal point
b. output with 1 place to the rigt of the decimal point
c. output in scientific notation
d. the number of decimal places to the right of the decimal point depends upon the value of myNum
e. none of the above

using the follow declarations (for both this question, and the next):
int whole;
float rNum;
char ch;
bool truth;

which of the following is not a valid assignment statement?
a. whole 7/12;
b. rNum=3;
c. ch=static_cast(98);
d. truth=true
e. rNum == 2.5 + floor (7.5);

using the variable dec. from the previous ques., which of the follwo statement is invalid
1. whole=13-2.0;
2.ch='T';
3.whole + 6=12;
4. rNum= 2+3.0;
5.rNum= 7E-3;

If r1 and r2 are declared to be of type float, and the cmath library has been included, then the expression r2=ceil(r1)-floor(r1);
a. produces a syntax error
b. is always equal to 0
is always equal to 1
is always equal to either 0 or 1
none of the above


If the variables , num1 and num2 are both of data tyep interher, and num 2 is not equal to 0, then when the expression , num1/num2 is evaluated:
the result is always of type floating point
the result is always of type integer
the result is of type integer only when there in no remainder from diving num2 into num1
the result is of type is floating point only when there is a remainder from diving num2 into num1
none of the above
given :
int num;
float rNum;
and the following two assignment statements:
num=sqrt (25.0);
rNum=sqrt (36.0);
a. both are assignements are valid
b. neither are valid

int wholeNum:
float value;
if the instruction:cin>>wholeNum>>value;
is executed, which of the following user inputs will not store 6 into wholeNum and 2.0 into value?
a. the user enter a 6, one space, and a 2.0
b. the user enters a +6, one space and a +2
c. the user enters a 6.0, one space and a 2
d. the user enters a 6, presses the enter key, then enters a 2.0

Given the string variable named phrase that has been initialized to hold the string "Spring has sprung", the statement
cout<produces what out put on a decc++ compiler?
spring has
spring
has sprung
Spring has sprung
An error message


for next 5 questions evaluate each expression and give resuilt
if the result is a floating point number, you must use a decimal point in your answer
if the result is not a floating point number, do not use a decimal point in your answer
expression 
32-10 * 3
static_cast(6.0)+static_cast('E') ______________
28.0/4 + 78 /10.0_____________
9.0-floor (10/3.0) _______________
static_cast(104)


If float variables num and result have been declared, and variable num is initialized to 44, determine the output of the following program fragment:
result=num/8;
cout<cout<_________________________________________

Two integer variables , num 1 and num 2 have been declared, and num 1 is intialized to 28. what will the output of the following program fragment be?
num2=num1 & 8;
if (num2 <=4)
num2 *=3;
ELSE
num2 +=10
cout<___________________________________

given integer variable num and floar variable value, determine the output of the following code segment
num=6+4;
value=12.0-2.0;
if (valuevalue/=4;
if (num>5)
value/=4;
if (num>5)
value+=um;
else value -=num;
cout<_____________________________

given integer variable num and character variable ch, what character value would be stored in ch after the following program fragment runs?
num=static_cast(pow (10.0,2);
ch=static_cast(num);
ch--;
_________________________________________
Given integer variables num and value, what integer number must num be intialized to before running the following code segment, so that num and value will not be equal after the code segment runs?
num *=2;
if (num !=10)
value=num;
else
value=num+1;
_________________________________
Given the statement
if ( (num <12)&& (num>25) )
which value of num would make the test condition evaluate to true?
11
18
30
none of these
all of these


If boolean variable stop is initialized to true, determine the output of the following program fragment
if (!stop)
cout<< "Nay"<else
cout << "Aye"<

Request for Solution File

Ask an Expert for Answer!!
Programming Languages: An interation statement can be used to repeat statements
Reference No:- TGS085485

Expected delivery within 24 Hours