- 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];

26th Sep 2021, 4:07 AM
YOUN Tit
YOUN Tit - avatar
1 Réponse
0
It's 6, 4 + 2 = 6
27th Oct 2021, 3:27 PM
Julian Bents
Julian Bents - avatar