Identify error, if any, in the following code segment: 1. class Sample 2. { 3. int m; 4. Sample ( ); 5. Sample (int); 6. };
- Line 6 should not have semicolon
- In line 5 parameter name is missing
- In line 4, argument should be of type void
- Constructors should be declared in public section
Answer:
Option c: In line 4, argument should be of type void
Explanation Here
0 Comments