TCS Company Programming Output

Find the minimum number of arithmetic operations required to evaluate below expression

f(P) = 8P^3 + 3P +12

Note - for a given value of P using only one temporary variable.

Read Solution (Total 8)

TCS Other Question

Find Prefix and Postfix for the below Infix problem statement:

Infix Expression: 11 + 20/5* (20 - 15)^6^5

A. Prefix Expression: 11 20 15 20 5 - ^^*6 5/+
Postfix Expression: +20 / 11 * 5 - 20 ^^15 6 5
B. Prefix Expression: 11 20 5 20 15 - 6 5^^*/+
Postfix Expression: +11 / 20 * 5^^ - 20 15 6 5
C. Prefix Expression: 11 20 5 20 15 - ^^*/+6 5
Postfix Expression: +11 /^^-20 * 5 20 15 6 5
D. Prefix Expression: +11/20 * 5^^ - 20 15 6 5
Postfix Expression: 11 20 5 20 15 - 6 5^^*/+