Given the following code, what is the value of RESULT?

DName+++++++++++ETDsFrom+++To/L+++IDc.Keywords+++++++++++++
D RESULT S 5 0

C EVAL RESULT = (2 + 3 * 2) ** 2 / 2

Answers were Sorted based on User's Feedback



Given the following code, what is the value of RESULT? DName+++++++++++ETDsFrom+++To/L+++I..

Answer / anuj

Agreed.. Should be 32.. see below

1. RESULT = (2 + 3 * 2) ** 2 / 2
2. RESULT = (8) ** 2 / 2
3. RESULT = 64 / 2 = 32.

Thanks.

Is This Answer Correct ?    17 Yes 0 No

Given the following code, what is the value of RESULT? DName+++++++++++ETDsFrom+++To/L+++I..

Answer / prad

32

Is This Answer Correct ?    7 Yes 0 No

Post New Answer

More RPG400 Interview Questions

In RPG program one file using as a PRIMARY file while running program some of the records reading twice any body know why its happening

2 Answers  


What you have to do in the display file when you are using message subfile?

1 Answers  


Im traying to get out put of this below mention simple logic code.But im geting out of different.(im trying with my laptop trhough my company server. DCL &FIELD1 *CHAR 10 VALUE('TCS AS/400') DCL &FIELD2 *CHAR 10 CHGVAR(%SST(&FIELD2 1 10))(%SST(&FIELD1 10 1) Can you tell me the value of field2 after excuted of CHGVAR command.

2 Answers  


what is overlay? how can we pass parameters in cl or rpg programing? how can we get data area value in cl or rpg programming?

2 Answers   IBM, Patni,


In a particular program one file is used where override command is applied to a file, now this program calls another program where we want to use the same file but without override.How it can be done?

6 Answers   Hexaware,






i want to perform uniqness on db file bt my db file nt hving key by useing rpgle.

3 Answers   HSBC,


How to define data area in RPG program? In which scenario multi occurrence DS is use in AS400?

0 Answers  


thanks mr.Harshad R Suryawaunshi,i'm new to as400 i think you are telling in rpgile i know only rpg400 if possible can you tell in rpg400

0 Answers   iGate,


HOW TO DELETE THE RECORD FROM MASTER FILE WHICH IS LINK BY ANOTHER TRASATION FILE WITH REFERTIAL INTYGRITY?

1 Answers   TCS,


1)how to do date validation in rpg? 2)how to delete dUPLICATE RECORDS?

12 Answers   IBM, Opus,


write an RPG program to calculate the marks of 5 students (A,B, C, D, E)in 3 different subjects (eng, math, sci) an display on the screen

0 Answers  


can we perform CHAIN operation on Subfile record format....?

4 Answers  


Categories