MCQ
How can we define a user-defined no-argument constructor ?
  • A
    <classname>( ) [ ];
  • B
    <objectname> { }( );
  • C
    <constructorname> [ ]( )
  • <classname>( ) { };

Answer

Correct option: D.
<classname>( ) { };
D

Need a full question paper?

Generate a complete, print-ready paper with questions like this in minutes — across 16+ boards, with answer keys.

Start Generating Free