Q. What is the difference between Console.Write() and Console.WriteLine() methods in C#?
-
(A)
Write() writes a single character while Console.WriteLine() writes a complete line
-
(B)
Write() writes the data on the console without printing a newline while Console.WriteLine() writes the data on the console along with printing a newline
-
(C)
ToFloat(Console.ReadLine());
-
(D)
Write() writes the string on the console while Console.WriteLine() writes the string as well as values of the variables on the console
β
Correct Answer: (B)
Write() writes the data on the console without printing a newline while Console.WriteLine() writes the data on the console along with printing a newline