The postfix equivalent of the infix expression (a + b)*(c*d - e) * f/g is :

This question was previously asked in
NIELIT Scientific Assistant CS 5 Dec 2021 Official Paper
View all NIELIT Scientific Assistant Papers >
  1. ab + cd*e - fg*/*
  2. ab cd*e - fg/** 
  3. ab cde* - fg/**
  4. abcd e*fg - /**

Answer (Detailed Solution Below)

Option 1 : ab + cd*e - fg*/*
Free
NIELIT Scientific Assistant Quantitative Aptitude Mock Test
0.5 K Users
20 Questions 20 Marks 30 Mins

Detailed Solution

Download Solution PDF

The correct answer is ab + cd*e - fg*/*.

key-point-imageKey Points

  • To convert an infix expression to its postfix equivalent, follow the order of operations and use a stack to manage the operators.
  • The given infix expression is (a + b)*(c*d - e) * f/g.
    • First, evaluate the expression inside the parentheses: a + b and c*d - e.
    • The postfix notation for a + b is ab+.
    • The postfix notation for c*d - e is cd*e-.
    • Next, multiply the results of these two expressions: (ab+)(cd*e-).
    • The postfix notation for this multiplication is ab+cd*e-*.
    • Finally, multiply by f and divide by g: (ab+cd*e-)*f/g.
    • The postfix notation for this final expression is ab+cd*e-*f*g/.
  • Therefore, the postfix equivalent of the infix expression (a + b)*(c*d - e) * f/g is ab+cd*e-*f*g/.

additional-information-imageAdditional Information

  • Infix notation is the standard arithmetic and logical formula notation, where operators are placed between operands (e.g., a + b).
  • Postfix notation (also known as Reverse Polish Notation) places operators after their operands (e.g., ab+).
  • Postfix notation eliminates the need for parentheses to define operation order.
  • This method is particularly useful in computer science for evaluating expressions in a stack-based manner.
Latest NIELIT Scientific Assistant Updates

Last updated on Feb 20, 2025

-> A total number of 113 revised vacancies have been announced for the post of Scientific Assistant in Computer Science (CS), Information Technology (IT), and Electronics & Communication (EC) streams.

-> Online application form, last date has been extended up to from 17th April 2025.

->The NIELT has revised the Essential Qualifications for the post of Scientific Assistant. Candidates must possess (M.Sc.)/ (MS)/ (MCA) / (B.E.)/ (B.Tech) in relevant disciplines.

 

-> The NIELIT Scientific Assistant 2025 Notification has been released by the National Institute of Electronics and Information Technology (NIELIT).

Get Free Access Now
Hot Links: teen patti 3a teen patti master plus teen patti gold old version teen patti game paisa wala teen patti joy apk