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


Consider the following COBOL entries
05 X PIC 99 VALUE 10.
ADD 40 X TO X.
COMPUTE X = 3 * X - 40.
The result in X is

Answers were Sorted based on User's Feedback



Consider the following COBOL entries 05 X PIC 99 VALUE 10. ADD 40 X TO X. COMPUTE X = 3 * X - ..

Answer / mr.perfect

ADD A B TO C. (Means (A+B)+C moved in C)
ADD 40 X TO X
Value of X is 10
So, ADD 40 10 TO 10 (Gives 40+10+10 = 60)

Now, COMPUTE X = 3 * X - 40
Here , order of preference is - then * will come
so, it will calculate first X-40 = 60-40 =20
THEN, 3*20 == 60
Means X = 3 * 60 - 40 ==20
So answer is : 60

Is This Answer Correct ?    0 Yes 2 No

Consider the following COBOL entries 05 X PIC 99 VALUE 10. ADD 40 X TO X. COMPUTE X = 3 * X - ..

Answer / ad

110

Is This Answer Correct ?    2 Yes 9 No

Post New Answer

More COBOL Interview Questions

How to declare if emp-name = AAAAA""BBB in working-storage section. After display emp-name should print like AAAAA""BB

6 Answers   Polaris,


how do you reference the rrds file formats from cobol programs

0 Answers  


How do pass the values to the parameters in cobol

2 Answers  


What is difference between static and dynamic call in cobol?

0 Answers  


u have passed sme charecters thru parm parameter in jcl. how do u code in cobol to recieve the values u gave in parm ?

2 Answers   IBM,


I try to use some column names in my cobol progorm but these column not in db2 table ..when do i get error ..while bind time or runtime?

2 Answers  


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

0 Answers   Winsol Solutions,


Consider the below example call a-test1. -- -- -- a-test1. if a=b perform a-test through a-exit next sentence else if b=c perform c-test through c-exit. if a=d perform d-test through d-exit. a-test. -- -- a-exit. exit. can u tell me what will happen if a=b after looping into a-exit will the control go back to a- test1. will the condition a=d be checked???

5 Answers   IBM,


What is amode(24)?

0 Answers  


should I use Go back in the main program ? Yes we can use Go back in main program as well.

2 Answers   Xansa,


What is JOBLIB and STEPLIB in JCL? what is the purpose of using it?

1 Answers  


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

0 Answers  


Categories