Given the code:
int a[10];
A[0]=10; A[1]=4; A[3]=15;
cout<
What will be the output of following code?
Answers
Answered by
0
Answer:
Look first of all if anyone will run the given code it will show some error.
First of all we need to modify it.
The code will be
int a[10]; // where it is declaring that the size of the array is 10
a[0] = 10; a[1] = 4; a[3] = 15; // here it is assigning the values for particular index
Now the last line, if we write only cout<< it will show an error
but if we write
cout<< a [0] ; //or any index number whose values are assigned
it will print the corresponding value of that object.
Similar questions
Geography,
5 months ago
Computer Science,
5 months ago
Math,
5 months ago
English,
10 months ago
Math,
10 months ago
Computer Science,
1 year ago