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
Maria is comparing her history project's second-place award to her classmate's first-place award. She starts planning how to win
weeeeeb [17]

Answer:

i would say long term

Explanation:

if she is planning for a while on how she is gonna get the first place award and its a long period of time before the next history project i would go with long term

5 0
3 years ago
Read 2 more answers
A client is
Vlad1618 [11]

Answer:

a computer that requests a service.

7 0
3 years ago
Read 2 more answers
How can I make a video game?
Rainbow [258]
You first need to figure out what kind of game you would like to create. Find codes and certain websites that will help you set up and or make a game.
3 0
2 years ago
Read 2 more answers
Which systems provide a single, cohesive platform
sergejj [24]

Answer:

ERP systems provide a single, cohesive platform

Explanation:

“ERP means Enterprise Resource Planning”. ERP is One solution for all the business need. It is a software(Business process management software) which does various functions and gives one single application for running all the process of the organization. It shares a common Database which “enables the user to perform multiple task” from multiple location.

ERP module includes Supply chain management, financials, online sales, decision support system, warehouse management, human resource, CRM, etc. Using ERP we can increase the interaction among the staff, reduce labor cost, etc.

6 0
3 years ago
Barricades, vertical panels, drums, and cones in construction zones are known as__________ devices.
Whitepunk [10]
<span>Barricades, vertical panels, drums, and cones in construction zones are known as channelizing devices. They a</span>re used in construction and maintenance work areas <span> to notify drivers or passengers of unusual or potentially dangerous conditions in or near work areas.
</span>A barricade is a portable or fixed device having from one to three rails with appropriate markings. It is used to control traffic by closing, restricting, or delineating all or a portion of the right-of-way.<span>Drums are most commonly used to channelize or delineate traffic flow but may also be used singly or in groups to mark specific locations.</span>
6 0
2 years ago
Other questions:
  • Which statement describes the word "iterative"?
    7·2 answers
  • Yahoo! allows users to create personalized my yahoo! pages. users can add or delete a variety of information from their personal
    8·2 answers
  • Fill in the blanks:(a)Every Java program must have at least one ______________.(b)The Java program is executed from _________ me
    12·1 answer
  • Consider the following C++ program in which the statements are in the incorrect order. Rearrange the statements so that itprompt
    6·1 answer
  • What’s the best description of an opportunity cost
    5·1 answer
  • Bao bì chủ động active packaging và bao bì thông minh intelligent packaging khác biệt như thế nào
    15·1 answer
  • Could someone please help?​
    10·1 answer
  • Using C, Write a program that reads a series of strings from standard input and prints only those strings beginning with the let
    8·1 answer
  • . Write a function sumLastPart which, only using list library functions (no list comprehension), returns the sum of the last n n
    6·1 answer
  • computer is an electronic machine that is used for data processing to produce meaningful information explain in statement​
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!