GATE CS 2017 (Forenoon) — Question 11

Computer Organization and Architecture (COA)Machine Instructions & Addressing ModesMCQ1 mark · −1/3 if wrongMedium

Consider the C struct defined below:
c
1struct data {
2    int marks [100];
3    char grade;
4    int cnumber;
5};
6struct data student;
7
The base address of student is available in register R1. The field student.grade can be accessed efficiently using
  1. A
    Post-increment addressing mode, (R1)+
  2. B
    Pre-decrement addressing mode, –(R1)
  3. C
    Register direct addressing mode, R1
  4. D
    Index addressing mode, X(R1), where X is an offset represented in 2's complement 16-bit representation.
Practise the full 2017-FN paper
Challenge a friend: WhatsApp Telegram
From RENYXERAPractise this subject in the exam simulatorTimed, GATE-style tests with analytics that find your weak topics.
Practise more on Machine Instructions & Addressing ModesTimed, in the real exam interface · free to start

A GATE question every morning

One real past-paper question every morning for your branch, answer hidden until you tap. Free on Telegram.

Join
Stuck? Ask in the student group