All Exams Test series for 1 year @ ₹349 only
Question

Which of the following is incorrect reference to the array in FORTRAN :

This question was previously asked in
UGC NET 2016 Paper 1 Question Paper (10-Jul-2016)
The correct answer is

A (N, X)

The rule being tested. In FORTRAN an array subscript must evaluate to an integer. A subscript may be an integer constant, an integer variable, or an integer expression built from them, but it may never be a real (floating-point) quantity, because a subscript selects a discrete storage location and a fractional index has no meaning.

Step 1 — how FORTRAN decides a variable's type. Under the implicit typing rules of classical FORTRAN, a name beginning with the letters I, J, K, L, M or N is INTEGER; a name beginning with any other letter (A–H or O–Z) is REAL. This is the famous "I through N" convention, and it is exactly what the question turns on.

Step 2 — test each option.

ReferenceSubscriptsValid?
A (2, 5)two integer constantsvalid
A (2 * 3, 6)integer expression 2×3 = 6, and a constantvalid
A (N, X)N is integer, but X begins with X, so X is REALinvalid
A (LOCATION, 8)LOCATION begins with L, so it is integervalid

Step 3 — read off the odd one out. Only A (N, X) uses a real subscript, so it is the incorrect array reference.

Why the other three tempt you. A (2 * 3, 6) looks suspicious because it contains an operator, but arithmetic expressions are perfectly legal subscripts as long as the result is integer — here 2×3 = 6. A (LOCATION, 8) looks suspicious because the name is long and descriptive, but the only thing that matters is its first letter, L, which makes it an integer under the implicit rule. If the array had been declared with a name starting in A–H, that would affect the type of the array's elements, not the legality of its subscripts.

Modern practice. Because implicit typing causes exactly this kind of silent bug, current FORTRAN code almost always begins with IMPLICIT NONE and declares every variable explicitly — then X would have to be declared INTEGER before it could ever be used as a subscript.

Hence, the incorrect reference is A (N, X).

Was this answer helpful?

Similar Questions

  1. The function "isalnum( )" returns a non-zero value if the character is alphanumeric and zero otherwise. What is header file to be used in the main program ?

  2. To read a integer variable, find the correct format given below :

    Int m;

  3. Find the correct list, which is the reverse (at all levels) of the given list :

    [[4, 7, 8], 2, 9, [19, 6], 20, 3]

    (i) 3, 20
    (ii) 9, 2
    (iii) [6, 19]
    (iv) [8, 7, 4]

  4. Which of the following is not an infinite loop ?

    (A) int i = 1; 

    while (1) 

         { 

               i++ ;

     }
     

    (B) for ( ; ; ) ;


    (C) int t = 0, f ;

     while (t) 

    {   

                  f = 1; 

    }
     

    (D) int y, x = 0 ; 

    do 

    {

     y = x; 

    } 

            while (x == 0);

  5. The three types of loops available in C language are

    i. for
    ii. while
    iii. do-while

    Which loops do not operate without testing the condition even once ?

  6. Match the following :

    List – IList – II 
    a. associativityi. memory storage
    b. # defineii. if-then-else
    c. autoiii. operators with equal precedence
    d. conditional operatoriv. define operator

    Codes :

  7. Assertion (A) : 'C' uses many data types such as integers (short and long) and float etc.

    Reason (R) : Conversion specifier used for short unsigned integer is % lu.

  8. Which bitwise operator is suitable for turning off a particular bit in a number ?

  9. Which storage class is used for the variables that are often required in a program ?

  10. Which is not a proper way of array declaration ?


Important Questions from Miscellaneous

  1. Which of the following is NOT a state function or state variable in a thermodynamic system?

  2. What is the full form for "BPL" in Socio-economic aspects?
  3. In October 2024, which of the following companies was awarded the contract for design, manufacturing and commissioning of two high-speed trainsets by Integral Coach Factory (ICF) to be used in India's first bullet train between Mumbai and Ahmedabad?
  4. Which of the following methods of reproduction simply involves the splitting of the parent cell into two daughter cells in the bacteria?
  5. A, B, C and D opened shopping complexes in the same city. The shopping complex of A is 6 km west of the shopping complex of B. The shopping complex of C is 4 km north of the shopping complex of B. The shopping complex of D is 6 km west of the shopping complex of C. In which direction is the shopping complex of D from the shopping complex of A?
Need Expert Advice?
Upcoming Exams
CTET
December 12, 2026
CBSE UGC NET
December 14, 2026
CSIR UGC NET
December 19, 2026
Test Series
UGC NET img
Teaching
UGC NET (Paper 2) 2026 Mock Test Series
796 Tests 2 Tests Free
219 Attempts
4.4(46)
English
More Questions from UGC NET

Start Your Preparation with Prepp Mobile App

Download the app from Google Play & App Store
Download the app from Google Play & App Store
Prepp Mobile App