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"

Answer Posted / vivek

take a stack and push operators into stack such as (*,+,_,/,etc) and when 2 operands(let a & B) appears pop out 1 operator and perform the expression (a operator B) and push it in 2 a stack



eg: ++2 6+-13 2 4
+(2+6) +-13 2 4
+8+(13-2)4
+8+11 4
+8(11+4)
+8 15
8+15
23 ans

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can a stack be described as a pointer? Explain.

930


How do you define a set?

907


How do you declare An array of three pointers to chars

871


Is arraylist a list?

904


Can arraylist hold different types?

1010


What is linked list ?

949


What is complete binary tree and almost complete binary tree?

818


What are lists?

952


How do you find the depth of a binary tree?

978


When is a binary search algorithm best applied?

1127


How is a hashset implemented?

941


Why you need a data structure?

1095


Does hashset maintain order?

942


Run time memory allocation is known as in data structure?

956


What do you mean by level of the tree?

1054