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. Smallest individual unit of a programming language - special symbols or word symbols or identifiers






2. Whole numbers - no decimals and no commas included






3. A __________ should be used to declare the size of an array because it makes the program more scalable.






4. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.






5. Grammar rules of the language; compiler will try to identify and locate syntax errors






6. * / % + -






7. The stream insertion operator






8. __________ can be used to assign an object of a class to another object of the same class.






9. Preprocessor directive syntax






10. To explicitly indicate that a value is to be converted to another type






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






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






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






14. A filestream variable that represents the default input source






15. In inheritance the ____________ is the class that supplies the inherited members.






16. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.






17. Operator with only one operand






18. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.






19. The symbol for the binary scope resolution operator






20. To write data to a file you define an object of which one of the following






21. The storage-class specifiers are mutable - auto - ________ - extern and static.






22. Classes can have relationships with other classes. These relationships are called ________.






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






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






25. 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.






26. newline






27. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution






28. The three values that can be used to initialize a pointer are 0 - __________ and an address.






29. When a value of one data type is implicitly (automatically) changed to another data type






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






31. Used for function calls and local variables






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






33. Function ________ is used to set the random number seed to randomize a program.






34. The ________ program combines the output of the compiler with various library functions to produce an executable image.






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






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






37. tab






38. Message displayed to the screen asking user for input; generated with an output statement






39. Used for dynamically allocated variables






40. Operator with two operands






41. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.






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






43. The only integer that can be assigned directly to a pointer is_____________.






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






45. Forces the computer to display decimal point and trailing zeroes






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






47. Function ________ is used to produce random numbers.






48. A function that calls itself either directly or indirectly - through another function) - is a ________ function.






49. A function is invoked with a ________.






50. The process of placing the elements of an array in order is called ________ the array.