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. A __________ should be used to declare the size of an array because it makes the program more scalable.






2. The conditional operator. it evaluates a line of code and returns one thing if the condition is true and a different thing if the condition is false.






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






4. Type casting syntax






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






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






7. Operator with only one operand






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






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






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






11. tab






12. The stream extraction operator






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






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






15. Used for function calls and local variables






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






17. Member objects are constructed __________ their enclosing class object.






18. Keyword public is a(n) _________






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






20. A C++ statement that makes a decision is ______.






21. A function that can be used to read character data including whitespace






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






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






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






25. The __________ operator reclaims memory previously allocated by new.






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






27. A constant object must be __________; it cannot be modified after it is created.






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






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






30. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')






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






32. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.






33. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.






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






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






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






37. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.






38. A function ________ enables a single function to be defined to perform a task on many different data types.






39. Default name of executable file






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


41. Identifier or expression that is part of the calculation to be performed






42. A ________ program executes before the compiler's translation phase begins.






43. int namespace include using return examples of ___________






44. Executable version of program






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






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






47. = & | are examples of ____________.






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






49. A memory location with a name and data type - its content may be changed during program execution






50. Function ________ is used to produce random numbers.