int a[ 10] = {1,5,3,8,4,2,6,9,7}; int *p; p = &a[2]; p[0] = 10; p[1] = 15; What are the values of a?

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter8: Arrays
Section: Chapter Questions
Problem 11RQ
icon
Related questions
Question
int a[ 10] = {1,5,3,8,4,2,6,9,7};
int *p;
p = &a[2];
p[0] = 10;
p[1] = 15;
What are the values of a?
Select one:
O a. {10,15,3,8,4,2,6,9,7}
O b. {1,15,10,8,4,2,6,9,7}
O c. {1,5,10,15,4,2,6,9,7}
O d. {1,10,15,8,4,2,6,9,7}
Transcribed Image Text:int a[ 10] = {1,5,3,8,4,2,6,9,7}; int *p; p = &a[2]; p[0] = 10; p[1] = 15; What are the values of a? Select one: O a. {10,15,3,8,4,2,6,9,7} O b. {1,15,10,8,4,2,6,9,7} O c. {1,5,10,15,4,2,6,9,7} O d. {1,10,15,8,4,2,6,9,7}
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 3 images

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT