1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
DENIUS [597]
2 years ago
12

Write a program that defines an array of integers and a pointer to an integer. Make the pointer point to the beginning of the ar

ray. Then, fill the array with values using the pointer (Note: Do NOT use the array name.). Enhance the program by prompting the user for the values, again using the pointer, not the array name. Use pointer subscript notation to reference the values in the array.
Computers and Technology
1 answer:
Reptile [31]2 years ago
3 0

Answer:

#include<iostream>

using namespace std;

int main()

{

  int a[20],n;

  int *p;

  cout<<"\n enter how many values do you want to enter:";

  cin>>n;

  for(int i=0;i<n;i++)

  {

      cout<<"\n Enter the "<<i+1 <<"th value :";

      cin>>*(p+i);

      //reading the values into the array using pointer

  }

  cout<<"\n The values in the array using pointer is:\n";

  for(int i=0;i<n;i++)

  {

      cout<<"\n (p+"<<i<<"): "<<*(p+i);

      //here we can use both *(p+i) or p[i] both are pointer subscript notations

  }

}

Output:

You might be interested in
Digital art is created by using
enyata [817]

Answer:

D. Computers

Explanation:

Digital art is when you make art on electronic devices.

8 0
2 years ago
Which part of the cryosphere comes directly from the atmosphere?
marin [14]
The answer to this question is C.
4 0
3 years ago
Read 2 more answers
Choose the correct term to complete the sentence.
Andre45 [30]

Answer:

Technology

Explanation:

Edge 2021

8 0
2 years ago
What the repeal of online privacy protections means for you?
kvv77 [185]
Online Privacy is well, our privacy while on the internet. If they have repealed that, then we have no privacy while on the internet. I feel like now a days there is no privacy at all anywhere. Everywhere you go, there are cameras watching you. So for them to take away online privacy is pretty messed up.
7 0
3 years ago
Assume the secret key is: (1, 2, 3, 4) -&gt; (3, 1, 4, 2); assume the plaintext THEYLOVEIT. If the sub-block length is 3, what i
Alex777 [14]
I belive their were answer chocies to this question am i right 

8 0
2 years ago
Other questions:
  • A network protocol is a set of rules defining communication between two devices. True False
    8·2 answers
  • Who were called “freedmen” during the reconstruction period?
    15·2 answers
  • Egyptian hieroglyphs were part of a writing system used by the ancient Egyptians. What type of graphic design elements did they
    13·1 answer
  • Harry Potter and his friends are at Ollivander's with Ron, finally replacing Charlie's old broken wand. Hermione decides the bes
    11·1 answer
  • Why do most laptops have LCD rather than OLED displays, which are found on mobile devices?
    14·1 answer
  • Which 3D game has Bentley the Bear collect gems while avoiding enemy trees, bees, ghosts, skeletons, and Berthilda the witch?
    9·1 answer
  • Ethical design refers to...
    13·1 answer
  • When would you insert a merge field?
    10·2 answers
  • Which of the following is as result of division of Labour​
    5·1 answer
  • What is the computer?​
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!