Which of the following is the correct way to define a variable of t

Loading

โœช Choose the correct option.

Which of the following is the correct way to define a variable of the type struct Emp declared below?

struct Emp {
private String name;
private int age;
private Single sal;
}
  1. Emp e(); e = new Emp();
  2. Emp e = new Emp;
  3. Emp e; e = new Emp;
  4. Emp e = new Emp();
  5. Emp e;

A. 44621
B. 44683
C. 44685
D. 38018

Leave a Comment