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. Returns the length of a string excluding the null terminator.






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






3. Whole numbers - no decimals and no commas included






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






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






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






7. Header file that contains commonly performed mathematical functions






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






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






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






11. data types that refer to numbers with decimals






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






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






14. Type casting syntax






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






16. = & | are examples of ____________.






17. This manipulator causes the field to be left-justified with padding spaces printed to the right.






18. The sign you use for pointers






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






20. For a local variable in a function to retain its value between calls to the function it must be declared with the ________ storage-class specifier.






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






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






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






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






25. A filestream variable that represents the default input source






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






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






28. A function is invoked with a ________.






29. All C++ Variables are_________.






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






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






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






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






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






35. Preprocessor directive syntax






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






37. Most calculations are normally performed by ______ statements.






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






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






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






41. Syntax for named constant declaration






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






43. int namespace include using return examples of ___________






44. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time






45. Creates a copy of a string.






46. The ________ program combines the output of the compiler with various library functions to produce an executable image.






47. Naming convention for C++ programs






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






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






50. The stream extraction operator







Sorry!:) No result found.

Can you answer 50 questions in 15 minutes?


Let me suggest you:



Major Subjects



Tests & Exams


AP
CLEP
DSST
GRE
SAT
GMAT

Most popular tests