Vidyalelo
C# Programming · Q25

Variables and Constants in C Sharp

Programming · C# Programming · question 25

Q25

Which of the following is a valid way to declare and initialize a string variable in C#?

A.
string = str;
B.
str Hello;
C.
string str = "Hello";
Answer
D.
str = "Hello";

Answer: Option C

Solution

Answer: Option C
No explanation is given for this question Let's Discuss on Board