Structures

Q1:
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 1, 3

B 2, 5

C 4, 5

D 1, 2, 4

ANS:A - 1, 3

No answer description is available. Let's discuss.



img not found
img

For help Students Orientation
Mcqs Questions

One stop destination for examination, preparation, recruitment, and more. Specially designed online test to solve all your preparation worries. Go wherever you want to and practice whenever you want, using the online test platform.