Correct Declaration of Values to variables 'a' and 'b'?
A. int a = 32, b = 40.6;
B. int a = 42; b = 40;
C. int a = 32; int b = 40;
D. int a = b = 42;
Answer: Option C
A. int a = 32, b = 40.6;
B. int a = 42; b = 40;
C. int a = 32; int b = 40;
D. int a = b = 42;
Answer: Option C
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