Computer Science EngineeringVery hard
An int a[10][20] array is stored in row-major order with base address 1000 and 4-byte elements. The address of a[3][5] is
- A. 1230
- B. 1260
- C. 1300
- D. 1380
Correct answer: B. 1260
Address = 1000 + (3*20 + 5) * 4 = 1000 + 260 = 1260.
Practise more Theory of Computation, Compilers & Digital Logic (ISRO CS) questionsTheory of Computation, Compilers & Digital Logic (ISRO CS): notes and key points
More Theory of Computation, Compilers & Digital Logic (ISRO CS) questions
- Which machine model is equivalent in power to context-free grammars?
- The intersection of a regular language and a context-free language is always
- Compared with a parse tree, an abstract syntax tree
- How many states does the LR(0) automaton (canonical collection of item sets, including the augmented production) have for the grammar S ->…
- For the grammar S -> aSb | c, what is FIRST(S)?
- Eliminating the left recursion from E -> E + T | T yields