what is the output of the following program? var firstname = \jacob\; var lastname = \smith\; var wholename…

what is the output of the following program? var firstname = \jacob\; var lastname = \smith\; var wholename = firstname + lastname; println(wholename); smith jacob jacob smith jacob smith jacobsmith

what is the output of the following program? var firstname = \jacob\; var lastname = \smith\; var wholename = firstname + lastname; println(wholename); smith jacob jacob smith jacob smith jacobsmith

Answer

Answer:

D. JacobSmith

Explanation:

Step1: Comprender la concatenación

En el código, se concatenan firstName y lastName sin espacios intermedios.

Step2: Identificar el resultado

El valor de firstName es "Jacob" y el de lastName es "Smith". Al concatenarlos sin espacio, el resultado es "JacobSmith".