Array | Sololearn: Learn to code for FREE!

-5

Array

What is the value of x after these statements execute? int[ ] a = {4, 7, 2}; int x = a[0]+a[2]; ================= Answers : 6 ================ coding with cshap using System; namespace MyApplication { class Program { static void Main(string[] args) { int[ ] a = {4, 7, 2}; int x = a[0]+a[2]; Console.WriteLine(a[0]+a[2]); } } } What is the value of x after these statements execute? int[ ] a = {4, 7, 2}; int x = a[0]+a[2];

9/26/2021 4:07:29 AM

YOUN Tit

1 Answer

New Answer

0

It's 6, 4 + 2 = 6