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. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.






2. Class members specified as _________ are accessible only to member functions of the class and friends of the class.






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






4. Whole numbers - no decimals and no commas included






5. The _____ causes the contents of another file to be inserted into a program.






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






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


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






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






10. The process of determining if an array contains a particular key value is called _________ the array.






11. An expression that has operands with different data types






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






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






14. Symbol that denotes an action to be performed






15. The stream extraction operator






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






17. A variable declared outside any block or function is a ________ variable.






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






19. The process of analyzing and designing a system from an object-oriented point of view is called ________.






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






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






22. Function ________ is used to produce random numbers.






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






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






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






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






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






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






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






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






31. A________ allows the compiler to check the number & types and order of the arguments passed to a function.






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






33. All ______ must be declared before they are used.






34. Keyword public is a(n) _________






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






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






37. The idea that you can call the same function and the output will depend on the type of object you're using.






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






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






40. data types that refer to numbers with decimals






41. Executable version of program






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






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






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






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






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






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






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






49. int namespace include using return examples of ___________






50. Used for function calls and local variables