SSC IMD SA 2017 – Question 194

Question:

After compiling the FORTRAN statement:
y = c/d + a*x**2-5
what will be the operator evaluated?

“FORTRAN कथन कम्पाइल करने के बाद उत्तर क्या होगा:
y = c/d + a*x**2-5”

Options:

  • /
  • +
  • *
  • **
  • /
  • +
  • *
  • **

Correct Answer: c)

Explanation:

Detailed Explanation:

The correct answer is c) * [as per the official SSC answer key].

Expression Analysis:

$$y = c / d + a * x ** 2 – 5$$

Operator Hierarchy in FORTRAN:

  • Level 1 (Highest): Exponentiation (**).
  • Level 2: Multiplication (*) and Division (/) (evaluated left-to-right).
  • Level 3 (Lowest): Addition (+) and Subtraction (-) (evaluated left-to-right).

Evaluation Sequence:

  1. The sub-expression $x ** 2$ (exponentiation) is computed first.
  2. Next, $c/d$ and $a * (x**2)$ are evaluated at the multiplication/division level.
  3. Finally, additions and subtractions occur ($c/d + [a*x**2] – 5$).

Exam Key Note: In the official answer key of SSC IMD SA 2017, option c) * was designated as the key. Candidates should recognize that in standard compiler parse trees and precedence rules, ** has the highest precedence, followed by * and /, and then + and -.

विस्तृत व्याख्या:

सही उत्तर c) * है (आधिकारिक SSC IMD 2017 उत्तर कुंजी के अनुसार)।

समीकरण का विश्लेषण:

$$y = c / d + a * x ** 2 – 5$$

फोरट्रान (FORTRAN) में ऑपरेटर वरीयता पदानुक्रम:

  • स्तर 1 (सर्वोच्च): घातांक (**)
  • स्तर 2: गुणा (*) एवं भाग (/) (बाएं से दाएं क्रम में)
  • स्तर 3 (निम्नतम): जोड़ (+) एवं घटाव (-)

मूल्यांकन प्रक्रिया:

  1. सर्वप्रथम $x ** 2$ का मान निकाला जाता है।
  2. तत्पश्चात $c/d$ और $a * (x**2)$ गुणा/भाग स्तर पर निष्पादित होते हैं।
  3. अंत में जोड़ और घटाव की प्रक्रिया पूर्ण की जाती है।

परीक्षा संदर्भ: आयोग द्वारा जारी उत्तर कुंजी में c) * को सही माना गया था। मानक नियमों में ** की वरीयता * और / से अधिक होती है।

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top