Discussion
Which of the following is an incorrect syntax to pass by reference a member of a structure in a function?
(Assume: struct temp{int a;}s;)
Answer: D
Correct answer: None of the above
All three are valid. &s.a works because . binds tighter than &; &(s.a) makes that grouping explicit; and &(s).a is the same again, since the parentheses round s change nothing. So none of the forms is incorrect.
No comment is present. Be the first to comment.
Loading…
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development