Test your basic knowledge |

C++ Programming Basics

Subject : it-skills
Instructions:
  • Answer 50 questions in 15 minutes.
  • If you are not ready to take this test, you can study here.
  • Match each statement with the correct term.
  • Don't refresh. All questions and answers are randomly picked and ordered every time you load a test.

This is a study tool. The 3 wrong answers for each question are randomly chosen from answers to other questions. So, you might find at times the answers obvious, but you will see it re-enforces your understanding as you take the test each time.
1. Most calculations are normally performed by ______ statements.






2. Syntax for named constant declaration






3. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.






4. C++ programs are normally typed into a computer using a(n) ________ program.






5. All C++ Variables are_________.






6. These are data items whose values do not change while the program is running






7. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.






8. Sets floating-point values to a fixed decimal format






9. A human readable file that contains C++ program






10. Keyword public is a(n) _________






11. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.






12. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.






13. An expression that has operands with different data types






14. The sign you use for references






15. Compares two strings and returns 0 if they are equal.






16. The size & shape & color and weight of an object are considered






17. For every opening brace in a C++ program there must be a ______________.






18. A pointer is a variable that contains as its value the____________ of another variable.






19. A sequence of operands and operators that describe a calculation to be performed






20. Class members specified as _________ are accessible anywhere an object of the class is in scope.






21. An expression in which all operands have the same data type - result will have the same data type as operands






22. A filestream variable that represents the default input source






23. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.






24. You can declare default values for a function in the ____________________.






25. Allows the programmer to store a value in a variable






26. Used for function calls and local variables






27. Whole numbers - no decimals and no commas included






28. * / % + -






29. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.






30. A __________ data member represents class-wide information.






31. The _________ begins the body of every function and the _________ ends the body of every function.






32. A program that finds and attaches to your program the indicated libraries for compilation






33. Characters used to separate symbols or reserved words or identifiers and statements






34. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.






35. Names of things that are used in a program - can apply to variables & constants and functions






36. Repeating a set of instructions a specific number of times is called_________repetition.






37. A variable declared outside any block or function is a ________ variable.






38. A member function should be declared static if it does not access __________ class members.






39. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors






40. All ______ must be declared before they are used.






41. An array that uses two subscripts is referred to as a(n) _________ array.






42. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time






43. Causes the program to immediately goes back to the top of the loop. the remainder of the statements in the loop are ignored for this current iteration.






44. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.






45. The ________ enables access to a global variable with the same name as a variable in the current scope.






46. The number used to refer to a particular element of an array is called its ________.






47. A function is invoked with a ________.






48. The _____ causes the contents of another file to be inserted into a program.






49. This is used to mark the end of a complete C++ programming statement.






50. Program components in C++ are called functions and ________.