what if any, is the syntax error in the following piece of code 01 B PIC A(7) 02 C PIC 9(4) IF(B NUMERIC) ADD 10 TO C a.the condition in the if statement is wrong b.noting is wrong c.because C is initialised.ADD 10 TO C is wrong d.both B and C shoud have same size.
RE: what if any, is the syntax error in the following ...
ANS IS b. nothing is wrong....because it won't give any compilation or run time error. its just that the condition won't be satisfied and 10 will not be added to C and since C has not been assigned any value nothing would be displayed. test it if u have doubt.
RE: what if any, is the syntax error in the following piece of code 01 B PIC A(7) 02 C PIC 9(4) IF(B NUMERIC) ADD 10 TO C a.the condition in the if statement is wrong b.noting is wrong c.because C is initialised.ADD 10 TO C is wrong d.both B and C
You are correct that it wont give any compilation or run time error but SYNTAX is definetly wrong. so the correct answer should be 'A.the condition in the if statement is wrong'