String Variables: Exercises

1. String Variable

Declare a string variable.

variables: whatevername(“”);

2. Merge strings

Merge the following strings into one string variable. Assume that we’ve already declared astring as a string variable. 

  • “This”
  • “is” 
  • “a” 
  • “string”

astring= “this” + “is” + “a” + “string”;

>

Login to Your Account



Signup Here
Lost Password