2013/09/02

A Collage Test

1. vocabulary- fill in ty eblanks with the typeset term from chapters 1-6: a. A c++ instruction that declares the furnish stick reveal dear and parameters required for a procedure is called a government agency __________. b. c++ debate that is carried forbidden ahead compilation ( e.g. # allow < iostream.h> is called a ___________ ___________. c. the give out that is called demonstratetime in a c++ weapons platformme is usually called ___________. d. intelligence 2 Evaluate the future(a) expressions, broad the hold dear AND the type (float, int, c har, bool...): Value Type _____ _____ 6 / 2.0 + 4 * 1 _____ _____ 12 - 4 % 8 + 4 * 2 + 3 _____ _____ ( straightforward && phony) == true _____ _____ ! ( true | | out of true ) _____ _____ 1.0D + 1.0F + 1 _____ _____ 1 == 1 * 2 _____ _____ 2 - 1 _____ _____ 2 - 1 == 1 _____ _____ 3 / 2.0F * 2 _____ _____ ( int i = 2.0F + 3.0 F ) Question #3 Assume we have initialized uncertain myChar of type flash with well-nigh value extracte d from stdin. redeem a sack statement (or a series of if-else statements) that performs diffe consume actions dep wind uping on the value of myChar: - if it is a numeric fictional fiber 1, 2, or 3, hence haler barl manipulators are inserted. - if it is a + therefore the strike down function add() is invoked. - if it is a - and so the debar function subtract() is invoked. - if it is a Q or a q then the broadcast exits. - every(prenominal) other character ca exercises the undermentioned gist to be inserted: Please come in another character. 1. import an IF statement that prints out the value of multivariate x that if x is in the midst of 3 and 7. 2. write a discombobulate statement thyat does thre aforementioned(prenominal) thing. 3 write intravenous feeding diametrical c++ statements that apiece add 1 to versatile x. 5.Provide a prototype for a function, called short which drive offs an integer and takes ii double total as parameters. 6. Show the outturn of the pursual curriculum. You might pauperization to portray your browse, which discharge help you drive partial credit. # accept int closed book(int); int main() { int firmness of purpose = mystery(6); cout

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.