Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Programming Language Expert

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 problem, 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 problems 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"<

Programming Language, Programming

  • Category:- Programming Language
  • Reference No.:- M985485

Have any Question?


Related Questions in Programming Language

Question 1 what is a computer program what is structured

Question: 1. What is a Computer program? What is structured programming? 2. What is modular programming? Why we use it? 3. Please evaluate Sin (x) by infinite series. Then write an algorithm to implement it with up to th ...

Assignment - proposal literature review research method1

Assignment - Proposal, Literature Review, Research Method 1. Abstract - Summary of the knowledge gap: problems of the existing research - Aim of the research, summary of what this project is to achieve - Summary of the a ...

Structs and enumsoverviewin this task you will create a

Structs and Enums Overview In this task you will create a knight database to help Camelot keep track of all of their knights. Instructions Lets get started. 1. What the topic 5 videos, these will guide you through buildi ...

Assignment - horse race meetingthe assignment will assess

Assignment - Horse Race Meeting The Assignment will assess competencies for ICTPRG524 Develop high level object-oriented class specifications. Summary The assignment is to design the classes that are necessary for the ad ...

Background informationthis assignment tests your

Background Information This assignment tests your understanding of and ability to apply the programming concepts we have covered throughout the unit. The concepts covered in the second half of the unit build upon the fun ...

Question - create a microsoft word macro using vba visual

Question - Create a Microsoft Word macro using VBA (Visual Basic for Applications). Name the macro "highlight." The macro should highlight every third line of text in a document. (Imagine creating highlighting that will ...

Task arrays and structsoverviewin this task you will

Task: Arrays and Structs Overview In this task you will continue to work on the knight database to help Camelot keep track of all of their knights. We can now add a kingdom struct to help work with and manage all of the ...

Assignment task -q1 a the fibonacci numbers are the numbers

Assignment Task - Q1. (a) The Fibonacci numbers are the numbers in the following integer sequence, called the Fibonacci sequence, and are characterised by the fact that every number after the first two is the sum of the ...

Assignmentquestion onegiving the following code snippet

Assignment Question One Giving the following code snippet. What kind of errors you will get and how can you correct it. A. public class HelloJava { public static void main(String args[]) { int x=10; int y=2; System.out.p ...

Overviewthis tasks provides you an opportunity to get

Overview This tasks provides you an opportunity to get feedback on your Learning Summary Report. The Learning Summary Report outlines how the work you have completed demonstrates that you have met all of the unit's learn ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As