Discussion
Match each attribute usage with the direction of information flow.
List I
A. the value of an arithmetic expression
B. the type declared for a list of names
C. the width of a generated code fragment
D. the nesting level of the enclosing block
List II
1. upward, synthesised
2. upward, synthesised
3. downward, inherited
4. downward, inherited
Answer: A
Correct answer: A-2, B-4, C-1, D-3
The direction follows from where the information comes from. An expression’s value and a code fragment’s width are both built up from the parts below, so they are synthesised. A declared type must be passed down to the list of names it applies to, and a nesting level comes from the enclosing block, so both are inherited.
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