GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Placement Papers  >  TCS  >  COBOL

 Print  |  
Question:  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.




June 06, 2006 11:32:40 #2
 sharmilabit   Member Since: June 2006    Total Comments: 3 

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.
     

 

Back To Question