GATE 2017 Previous Year Paper Solution Question 9 – Computer Science
In this video the question which was asked in the exam of GATE 2017, has been discussed.
Question :- Consider the C struct defined below :
struct data {
int marks [100];
char grade;
int cnumber;
};
struct data student;
The base address of student is available in register R1. The field student grade can be accessed efficiently using
A. Post-incriment addressing mode, (R1)+
B. Pre-decrement addressing mode, -(R1)
C. Register direct addressing mode, R1
D. index addressing mode, X(R1), where X is an offset represented in 2’s compliment 16-bit representation.
Solution is given in the video.