Monday, 7 October 2013

What will be the output of the following String code?

DATA: text TYPE string VALUE 'TEST-*-SAP*-NEW*'.
IF text IS NOT INITIAL AND text CS '*'.
  REPLACE LAST OCCURRENCE OF '*' IN text WITH '^' .
  WRITE : / text.
ENDIF. 
A. TEST-*-SAP*-NEW
B. TEST-^-SAP*-NEW*
C. TEST-*-SAP*-NEW^
D. Syntax Error

Ans: D

No comments: