INTRO TO PROGRAMMING USING C++
INTRO TO PROGRAMMING USING C++ CMSC 245
Virginia Commonwealth University
Popular in Course
Popular in ComputerScienence
This 3 page Class Notes was uploaded by Adriel Romaguera on Wednesday October 28, 2015. The Class Notes belongs to CMSC 245 at Virginia Commonwealth University taught by Ju Wang in Fall. Since its upload, it has received 19 views. For similar materials see /class/230651/cmsc-245-virginia-commonwealth-university in ComputerScienence at Virginia Commonwealth University.
Reviews for INTRO TO PROGRAMMING USING C++
Report this Material
What is Karma?
Karma is the currency of StudySoup.
You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!
Date Created: 10/28/15
1 What is the rst step in the Software Development Process A Code B Test C Requirements D Design 2 Which of the following are valid C identi ers A age B grade C return D b234 E 3Numbers F 123 3 A variable s scope A determines where it can be used in a program B can be changed during run time c should be assigned to zero at the end of the program D must be declared before the main function 4 Constants A are variables whose values can t be changed B are identities with a xed value C must be de ned before the main progtam D can t be used in function 5 Which of the following objects and functions are used for Standard Input and Output in C A print B cin C cout Dgetine 5 Using the following code snippet what is the value of quotgradequot int A11 B9 grade grade A B A 20 B 99 C 32 D 100 E o 6 What is the value of animal after the if statement is executed bool cattrue dogfase bool animal if cat ampamp dog animal true else animal false A true B false C dogcat D catdog 7 A statement in a C program must end with A a semicolon B a period C a coma D a verb 8 What is the value ofX after the loop has terminated intX 0 for int n10 ngt0 n 9 A function A is a group of statements B must not be empty C should at least contain one variable D must be called from some point in the main function of the program 10 The following function returns what value void addNumber int a int b int c c a b A Value of c B Value of a C Nothing D Depends on the values passed in 11 An array A is many ofelements of the different type placed in contiguous memory locations B element can be individually referenced by using an index with the array name Cstart with an index of 1 D will shrank if it is subtracted by one 12 Which ofthe following are not a feature ofobjects and classes A Attributes B Information Hiding C Methods D Constructors E Destructors F They are all features 13 Which of the following sequence is correct A CodinggtCompilinggtProgram Execution BDebugging gt Compiling gt Program Execution CCompiling gt Program Execution gt Fix Syntax Errors DCoding gt Program Execution gt Compiling 14 A syntax error will occur if A The program is in nite looping B A variable is not initialized to zero C a function is de ned but not called D a variable is de ne twice in the main lnction 15 which of the following is true A A C program must have exactly one main function B A C program could have more than two main functions C A C program must call the main function at least once D A C program must de ne the main function before any other function 16 If a C program is successfully compiled but it has been running for 24 hours so far A one can conclude that the program has a in nite loop B one can conclude that the operating system goes wrong somewhere C one can conclude that the program have some syntax errors D one can say none of the above 17 A variable declared inside a function is called A local variable B global variable C function variable D temporary variable 18 The C compiler compiles the source code cpp le into A obj les and then to an executable le B class les and then to an object le C object les than class les D binary les then to a class le
Are you sure you want to buy this material for
You're already Subscribed!
Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'