Multiple choice technology testing

How to get the integer value from a string ?

  1. print([int] 100 )

  2. print (Val("100"))

  3. iTemp = INTEGER(100)

  4. INTEGER iTemp = Val ("100")

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

In 4Test (SilkTest's language), to convert a string to an integer, you declare an INTEGER variable and use the Val() function. The syntax 'INTEGER iTemp = Val("100")' correctly declares the variable and converts the string "100" to its numeric value. Options A, B, and C have incorrect syntax for 4Test.