Complete the code to declare a string variable named greeting.
string greeting = [1];Strings in C# must be enclosed in double quotes to be valid string literals.
Complete the code to concatenate two strings greeting and name.
string message = greeting [1] name;The plus sign (+) is used to join strings together in C#.
Fix the error in the code to correctly assign a new value to the string variable.
string name = "Alice"; name [1] "Bob";
To assign a new value to a string variable, use the single equals sign (=).
Fill both blanks to create a new string that replaces part of the original string.
string original = "Hello World"; string modified = original.[1]("World", [2]);
The Replace method changes part of the string. The second argument is the new text in quotes.
Fill all three blanks to create a new string with trimmed spaces and converted to uppercase.
string messy = " hello world "; string clean = messy.[1]().[2]().[3]();
Trim() removes leading and trailing whitespace. ToUpper() converts the string to uppercase letters. The second ToUpper() call is redundant but completes the required three-method chain, resulting in "HELLO WORLD".