Question

Assume the following declarations: int b[] = {10, 20, 30}; int *x = b + 1;...

Assume the following declarations:

int b[] = {10, 20, 30};

int *x = b + 1;

Choose all the expressions that are defined and evaluate to 10

A. *b

B. b[1]

C. *x

D. x[-1]

E. x[1] - b[1]

0 0
Add a comment Improve this question Transcribed image text
Answer #1

answer: A,D,E
  

main.cpp 1 #include <iostream> 2 using namespace std; 3 int main() 4- { int b[] = {10, 20, 30}; int *x = b + 1; cout<<*b; ret

main.cpp 1 #include <iostream> 2 using namespace std; 3 int main() 4-{ int b[] = {10, 20, 30}; int *x = b + 1; cout<<x[-1]; o

main.cpp 1 #include <iostream>, 2 using namespace std; 3 int main() int b[] = {10, 20, 30}; int *x = b + 1; cout<<x[1] - b[1]

########################################################

Give a ThumbsUp if you found this answer Helpful :)
#######################################################

################################################################
............ Still having trouble understanding the answer ? Feel free to ask in the comment section.......

Add a comment
Know the answer?
Add Answer to:
Assume the following declarations: int b[] = {10, 20, 30}; int *x = b + 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