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






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






3. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.






4. The modulus operator (%) can be used only with __________.






5. Naming convention for C++ programs






6. A function is invoked with a ________.






7. The ________ qualifier is used to declare read-only variables.






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






9. The sign you use for pointers






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






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






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






13. In inheritance the ____________ is the class the receives the inherited members.






14. The stream insertion operator






15. Function ________ is used to produce random numbers.






16. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.






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






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






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






20. Whole numbers - no decimals and no commas included






21. Every C++ statement ends with a(n) _________.






22. Preprocessor directive syntax






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






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






25. Class members are accessed via the ________ operator in conjunction with the name of an object (or reference to an object) of the class or via the arrow (->) operator in conjunction with a pointer to an object of the class.






26. A filestream variable that represents the default output device






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






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






29. The ________ program transfers the executable image of a C++ program from disk to memory.






30. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.






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






32. A filestream variable that represents the default input source






33. Objects have the property of ________although objects may know how to communicate with one another across well-defined interfaces - they normally are not allowed to know how other objects are implemented.






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






35. Type casting syntax






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






37. The address-of operator. it is used to assign pointers and to print the address of variables.






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






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






40. The keyword ________ is used in a function header to indicate that a function does not return a value or to indicate that a function contains no parameters.






41. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.






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






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






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






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






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






47. The stream extraction operator






48. Operator with two operands






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






50. = & | are examples of ____________.