Multiple choice technology programming languages

The Equivalent Code for CATX(SP, OF X1-X4) is

  1. X1||SP ||X2||SP||X3||SP||X4

  2. TRIM(X1)||SP||TRIM(X2)||SP||TRIM(X3)||SP||TRIM(X4)

  3. TRIM(LEFT(X1))||TRIM(LEFT(X2))||TRIM(LEFT(X3))||TRIM(LEFT(X4))

  4. TRIM(LEFT(X1))||SP||TRIM(LEFT(X2))||SP||TRIM(LEFT(X3))||SP||TRIM(LEFT(X4))

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

The CATX function in SAS concatenates character strings, strips leading and trailing blanks from each argument, and inserts a specified delimiter between them. Thus, CATX(SP, OF X1-X4) is equivalent to stripping and left-aligning each variable and inserting the SP delimiter between them.