Vidyalelo
C# Programming · Q44

Basic Syntax and Data Types in C Sharp

Programming · C# Programming · question 44

Q44

What is the correct way to declare and initialize a string variable in C#?

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

Answer: Option D

Solution

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