Question

What is the output of the following code: int numbers [] {99,87,66,55,101}; cout << numbers[i] « ;
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Given Code:

int numbers[]={99,87,66,55,101};
cout<<numbers[i]<<" ";

Output of given code:

error: ‘i’ was not declared in this scope
cout<<numbers[i]<<" ";

If i is declared then

Code is like this

int i;

int numbers[]={99,87,66,55,101};
cout<<numbers[i]<<" ";

The default value of int is 0 so i=0

Then Output will be numbers[0] that is 99

Add a comment
Know the answer?
Add Answer to:
What is the output of the following code: int numbers [] {99,87,66,55,101}; cout << numbers[i] «...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT