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. Member objects are constructed __________ their enclosing class object.






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






3. Lists and tables of values can be stored in arrays or __________.






4. To allow file access in a program you must #include this header file.






5. An operator that can only be used with int values. result will always be an int.






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






7. A function that calls itself






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






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






10. Two slash marks ( // ) indicate __________ of a comment






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






12. Nonexecutable statements that are included in a program to provide information about what the program does etc.






13. This manipulator is used to establish a field width for the value immediately following it.






14. Smallest individual unit of a programming language - special symbols or word symbols or identifiers






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






16. Syntax for named constant declaration






17. The symbol for the binary scope resolution operator






18. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.






19. int namespace include using return examples of ___________






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






21. = & | are examples of ____________.






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






23. Associate an identifier with a memory location






24. The elements of an array are related by the fact that they have the same name and ___________.






25. When it is not known in advance how many times a set of statements will be repeated a _________value can be used to terminate the repetition.






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






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






28. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________






29. Returns the length of a string excluding the null terminator.






30. The stream insertion operator






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






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






33. A type of pointer that can point at objects of any data type.






34. The three ways to return control from a called function to a caller are ________ - return expression and encounter.






35. Every C++ program begins execution at the function _________.






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






37. directive A statement that starts with a # is called a ____________.






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






39. Initializers __________ must be used to initialize constant members of a class.






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






41. Symbol that denotes an action to be performed






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






43. Header file that contains commonly performed mathematical functions






44. Words that are used for special purposes in a program






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






46. Manipulator that causes the insertion point (cursor) to move to the beginning of the next line


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






48. Function ________ is used to produce random numbers.






49. A file must be ________ before data can be written to or read from it.






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