Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Evaluate the following prefix expression " ++ 26 + - 1324"

Answers were Sorted based on User's Feedback



Evaluate the following prefix expression " ++ 26 + - 1324"..

Answer / uma sankar pradhan

++ 26 + - 1324
= +(2+6) + - 1324
= +(2+6) + (1-3)24
= +(2+6)((1-3)+24)
= (2+6)+((1-3)+24)
= 8+(-2+24)
= 8+22
= 30

Is This Answer Correct ?    114 Yes 34 No

Evaluate the following prefix expression " ++ 26 + - 1324"..

Answer / babitha p

++26+-1324
++26((1-3)+24)
(2+6)+((1-3)+24)
=8+(-2)+24
=30.

Answer is 30

Is This Answer Correct ?    31 Yes 14 No

Evaluate the following prefix expression " ++ 26 + - 1324"..

Answer / sanatomba

++26+-1324
=+(2+6)+(1-3)24
=(2+6)+(1-3)+(24)
=8+(-2)+24
=8-2+24
=6+24
30

Is This Answer Correct ?    20 Yes 12 No

Evaluate the following prefix expression " ++ 26 + - 1324"..

Answer / kushal bagaria

There can be two possibilities.Either
1)this expression has 1 operator missing

or
2) one of the operator is a two digit number.

Is This Answer Correct ?    10 Yes 4 No

Evaluate the following prefix expression " ++ 26 + - 1324"..

Answer / navneet kang

++26 + -1324
METHOD:-
Start scanning the string from the right one character at a time.
If it is an operand, push it in stack.
If it is an operator, pop opnd1, opnd2 and perform the operation, specified by the operator. Push the result in the stack.
Repeat these steps until arr of input prefix strings ends.
Solution
1)Push 4,2,13 in stack one by one
2) - operator encountered
3)Take out 13 and 2 from stack and perform operation
4)Now Stack consist of 4,11
5)+ operator encountered
6)Now Stack consist of 15
7)Now push 6 in stack,Hence Now Stack consist of 15,6,2
8)Perform add operation + encountered
9)Now Stack consist of 15,8
10)+ operator encountered
11)Now Stack consist of 23

Hence Answer is 23

Is This Answer Correct ?    8 Yes 3 No

Evaluate the following prefix expression " ++ 26 + - 1324"..

Answer / rushi

I see multiple answers to this depending on how you interpret 1324 into 3 numbers i.e. either 1 3 24, 13 2 4, 1 32 4, etc.


1. ++ 26 + - 1324
+(+26) + - 1324 -> +26 becomes 8
+8+(-13 2)4 -> 13 -2 = 11
+8(+11 4) -> 11 +4 = 15
+8 15
= 23

2.++ 26 + - 1324
+(+26) + - 1324 -> +26 becomes 8
+8+(-1 3)24 -> 1 -3 = '-'2
+8(+(-2) 24) -> 24 + -2 = 24 -2 = 22
+8 22
= 30

3.++ 26 + - 1324
+(+26) + - 1324 -> +26 becomes 8
+8+(-1 32)4 -> 1 -32 = '-'31
+8(+(-31) 24) -> -31 + 24 = -7
+8 '-7'
= 1

Is This Answer Correct ?    6 Yes 3 No

Evaluate the following prefix expression " ++ 26 + - 1324"..

Answer / bharath

aqmbiguity here
is it 1324 or 2 dgits is a no. like 12 2 4 or may be 1 32 4
and so on.

Is This Answer Correct ?    4 Yes 2 No

Evaluate the following prefix expression " ++ 26 + - 1324"..

Answer / vinoth kumar.r

:D I think the question is wrong.
It didnt define the token.

Is This Answer Correct ?    8 Yes 7 No

Evaluate the following prefix expression " ++ 26 + - 1324"..

Answer / kushal bagaria

There can be two possibilities.Either
1)this expression has 1 operator missing

or
2) one of the operand is a two digit number.

Is This Answer Correct ?    3 Yes 2 No

Evaluate the following prefix expression " ++ 26 + - 1324"..

Answer / sachin bathri

15 is right

Is This Answer Correct ?    2 Yes 1 No

Post New Answer

More Data Structures Interview Questions

What is shell sort in data structure?

0 Answers  


How do you assign an address to an element of a pointer array ?

0 Answers  


Which type of memory allocation is referred for linked list?

0 Answers  


Differentiate between priorityqueue and treeset.

0 Answers  


Data structure used to implement a menu

0 Answers  


Why do we use different types of data structures?

0 Answers  


How to print element of Array?

0 Answers  


Explain the Complete structure of hashmap along with the basic coding of the hashmap internal implementation.

0 Answers   Expedia,


Which is the fastest sorting?

0 Answers  


Of the following tree structure, which is, efficient considering space and time complexities? (a) Incomplete Binary Tree (b) Complete Binary Tree (c) Full Binary Tree (b) Complete Binary Tree.

1 Answers  


What is an iterative algorithm?

0 Answers  


For searches. Which one is most preferred: array list or linked list?

0 Answers  


Categories