C++ Programming Fundamentals
Test your knowledge of C++ programming concepts including operators, data types, inheritance, arrays, pointers, and code execution behavior.
Questions
Question 1 Multiple Choice (Single Answer)
void main() { char *p = "ayqm"; char c; c = ++*p++; printf("%c",c); }
- a
- b
- y
- z
Question 2 Multiple Choice (Single Answer)
union a { int a,b; }a1; void main() { a1.a=10; a1.b=20; printf("%d",a1.a); }
- unknown symbol ‘a1’
- compile error
- 10
- 20
Question 3 Multiple Choice (Single Answer)
What number of digits that can be accurately stored in a float (based on the IEEE Standard 754)?
- 6
- 38
- An unlimited number
- None Of the above
Question 4 Multiple Choice (Single Answer)
C++
- 1
- 0
- Code cannot compile
- None of the Above
Question 5 Multiple Choice (Single Answer)
C++
- 6
- 38
- An unlimited number
- None of the Above
Question 6 Multiple Choice (Single Answer)
C++
- \0
- .
- \END
- None of the Above
Question 7 Multiple Choice (Single Answer)
C++
- 5
- 1
- 3
- None of the Above
Question 8 Multiple Choice (Single Answer)
C++
- Yes
- No
- Only optimized compilers will compile C++ code.
- None of the Above
Question 9 Multiple Choice (Single Answer)
C++
- Breaks out of the if statement
- Exits the function
- Nothing (Compiler error)
- None of the Above
Question 10 Multiple Choice (Single Answer)
C++
- Copies "This" into an_array
- Adds "This" to the end of an_array
- Compares an_array and "This"
- None of the Above
Question 11 Multiple Choice (Single Answer)
C++
- 10
- 11
- 1
- None of the Above
Question 12 Multiple Choice (Single Answer)
C++
- 2
- 4
- 0
- None of the Above
Question 13 Multiple Choice (Single Answer)
C++
- Binary Tree
- Hash Table
- Stack
- None of the Above
Question 14 Multiple Choice (Single Answer)
C++
- class aclass : public superclass
- class aclass inherit superclass
- class aclass <-superclass
- None of the Above
Question 15 Multiple Choice (Single Answer)
C++
- 28
- 9
- Any of them could be
- None of the Above
Question 16 Multiple Choice (Single Answer)
C++
- No
- Case sensitivity is compiler-determined
- Yes
- None of the Above
Question 17 Multiple Choice (Single Answer)
C++
- unsigned int
- char
- Float
- None of the Above
Question 18 Multiple Choice (Single Answer)
C++
- public
- protected
- guarded
- None of the Above
Question 19 Multiple Choice (Single Answer)
C++
- &&
- ||
- !
- None of the Above
Question 20 Multiple Choice (Single Answer)
C++
- True
- False
- It depends on the variable type
- None of the Above