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. C++ programs are normally typed into a computer using a(n) ________ program.






2. Keyword public is a(n) _________






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






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






5. You must have a ___________ for every variable you intend to use in a program






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






7. An expression that has operands with different data types






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






9. Preprocessor directive syntax






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






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






12. The stream extraction operator






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






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






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






16. Operator with only one operand






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






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






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






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






21. = & | are examples of ____________.






22. Creates a copy of a string.






23. Syntax for named constant declaration






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






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






26. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .






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






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






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






30. int namespace include using return examples of ___________






31. The ________ of an identifier is the portion of the program in which the identifier can be used.






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. Manipulator that causes the insertion point (cursor) to move to the beginning of the next line

Warning: Invalid argument supplied for foreach() in /var/www/html/basicversity.com/show_quiz.php on line 183


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






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






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






38. The escape sequence ___ when output with cout and the stream insertion operator - causes the cursor to position to the beginning of the next line on the screen.






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






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






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






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






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






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






45. The ________ statement in a called function passes the value of an expression back to the calling function.






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






47. tab






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






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






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