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.




April 04, 2006 08:26:42 #1
 Kiran   Member Since: Visitor    Total Comments: N/A 

RE: what if any, is the syntax error in the following ...
 

Ans:- a(the condition in the if statement is wrong)

For the Variable declared as alphabetic the valid test conditions are

 A IS [NOT]ALPHABETIC

 A IS [NOT]ALPHABETIC-LOWER

 A IS [NOT]ALPHABETIC-UPPER

    Where [NOT] is optional...

     

 

Back To Question