Multiple choice technology programming languages

which one of the below is correct with respect to string repeatation a) print "TEST" X 10; b) print "TEST" x 10; c) print 10 X "TEST"; d) print 10 x "TEST";

  1. a

  2. b

  3. c

  4. d

  5. b and d

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

Perl uses the 'x' operator (lowercase) for string repetition. 'TEST' x 10 repeats 'TEST' 10 times. The uppercase 'X' is not a valid repetition operator. Option b shows correct lowercase syntax. Options a and c use uppercase X which is wrong. Option d reverses the operand order incorrectly.