What is the output of the following code: Console.WriteLine($"5 + 5 = {5 + 5}");
A. 5 + 5 = 10
B. 10
C. $"5 + 5 = {5 + 5}"
D. Compilation error
Answer: Option A
A. 5 + 5 = 10
B. 10
C. $"5 + 5 = {5 + 5}"
D. Compilation error
Answer: Option A
What is the correct syntax to declare a variable in C#?
A. num = int;
B. var num;
C. num int;
D. int num;
What is the purpose of the 'var' keyword in C#?
A. Declares a constant
B. Converts a variable to string
C. Implicitly declares a variable
D. Defines a method
Join The Discussion