Question

Explain the results 푤include <iostream> using nanespace std: int nain (O rloat arr[s- (12.5,.11.0, 13.8, 1000.5, 1.5): float
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer 4:
So here we are point the 0th location with ptr1
next ptr2 is initialized with ptr1+3 means ptr2 will point element at 3rd location which is 1000.5
so it will print 1000.5
now we subtract 2 pointers it will give distance
so ptr2 is at 3 and ptr1 is at 0
so 3-0=3
so it will print 3
next we are increamenting ptr2 so it will increase 1000.5 to 1001.5


Answer 5:
1000.5 will replaced with 1.5; as ptr2+1 will gives next element
Answer 6:
As it will give size of point as arr will pointer as we are passing it functions
so it will give 8 and size of arr[0] is 4 so 8/4=2 so it will print only 2 locations

Add a comment
Know the answer?
Add Answer to:
Explain the results 푤include using nanespace std: int nain (O rloat arr[s- (12.5,.11.0, 13.8, 1...
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