Vidyalelo
C# Programming · Q69

Operators and Expressions in C Sharp

Programming · C# Programming · question 69

Q69

What will be the output of the following C# code? static void Main(string[] args) int n = 5; int x = 4; int z, c, k; z = 3 * x * x + 2 * x + 4 / x + 8; for (c = 1; c <= n; c++) for (k = 1; k <= c; k++) Console.Write(Convert.ToString(Convert.ToChar(z))); z++; Console.WriteLine(" "); Console.ReadLine();

A.
A
AA
AAA
AAAA
AAAAA
B.
A
AB
ABC
ABCD
ABCDE
C.
A
BC
DEF
GHIJ
KLMNO
Answer
D.
A
AB
BC
BCD
BCDE

Answer: Option C

Solution

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