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...

Without using move verb how to move one variable to another.

Answer Posted / raju

Let the variables and their values be A = 20 and B = 30
and we need to swap them as A = 30 and B = 20 without MOVE statement
BEFORE AFTER
A B A B
Way 1: COMPUTE A = A+B 20 30 50 30
COMPUTE B = A-B 50 30 50 20
COMPUTE A = A-B 50 20 30 20

Way 2: COMPUTE A = A*B 20 30 600 30
COMPUTE B = A/B 600 30 600 20
COMPUTE A = A/B 600 20 30 20

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

) How do u handle errors in BMS macro

2103


What is rmode(24)

1194


What is comp-1 and comp-2?

1278


What is perform what is varying?

1218


What is inspect in cobol ?

1352


How are the next sentence and continue different from each other?

1338


What is the Purpose of POINTER Phrase in STRING command in COBOL?

1298


Differentiate between structured cobol programming and object-oriented cobol programming.

1211


How to remove 2 duplicate records and copy only one using job control language?

1257


What is amode(24)?

1294


how do you reference the printer file formats from cobol programs

1276


Mention the guidelines to write a structured cobol program?

1137


How many sections are there in data division in COBOL?

1179


Explain how will you differentiate between an internal and an external sort, the pros and cons, internal sort syntax etc

1306


Explain sorting techniques in cobol program? Provide the sort file definition, the sort statement, its syntax and meaning

1143