Curioustab
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Home
»
C# Programming
»
Structures
Which of the following is the correct way of setting values into the structure variable e defined below? struct Emp { public String name; public int age; public Single sal; } Emp e = new Emp();
e.name = "Amol"; e.age = 25; e.sal = 5500;
With e { .name = "Amol"; .age = 25; .sal = 5500; }
With emp e { .name = "Amol"; .age = 25; .sal = 5500; }
e -> name = "Amol"; e -> age = 25; e -> sal = 5500;
name = "Amol"; age = 25; sal = 5500;
Show Answer
Correct Answer:
e.name = "Amol"; e.age = 25; e.sal = 5500;
← Previous
Next →
Discussion & Comments
No comments yet. Be the first to comment!
Name:
Comment:
Post Comment