Computer Science · C++ OOPs Concepts
Identify the line that causes a compilation error in the following C++ code fragment: 1 class exam 2 { public : 3 virtual void show () = 0; 4 }; 5 int main (void) 6 {exam e; 7 exam * ep ; 8 return 0 ; }
- 1Compiler error at line 3
- 2Compiler error at line 6✓
- 3Compiler error at line 7
- 4Compiler error at line 6 and 7
Correct answer
Compiler error at line 6
Download Single Question PDF
Save this question and verified answer as a clean study sheet with live clickable link.
Share with Friends & Study Groups
Challenge your peer aspirants on WhatsApp or Telegram to solve this question!
Preparing for Computer Science?
Practice full-length mock tests with real exam timers, instant score analysis, and all-India ranking.
Want more practice questions on C++ OOPs Concepts?
Solve complete topic-wise tests with detailed solutions on GkGet.
Related Practice Questions
Recommended practice questions in Computer Science · C++ OOPs Concepts