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

What is the difference between binary search and sequential search?

1054


1.give the details about WHEN OTHER. 2. how many form are available in evaluate.

2075


how do you reference the rrds file formats from cobol programs

1519


What is static and dynamic call in cobol?

1023


What is a scope terminator give example?

1063


Explain how to differentiate call by context by comparing it to other calls?

1143


Explain what you understand by passing by value.

1105


How you can characterize tables in cobol?

1158


what are decleratives in cobol?

2219


What is link edit in cobol?

1162


can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there

2334


What is the difference between external and global variables in COBOL?

1383


Name the sections present in data division.

1186


What are the different data types in cobol?

1353


What is Pic 9v99 Indicates in COBOL?

1196