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
nydimaria [60]
3 years ago
6

Allocate 100 integers and assign the resulting pointers to the elements of ip_arr. Initialize each integer value to -1.

Computers and Technology
1 answer:
dmitriy555 [2]3 years ago
5 0

Answer:

#include <iostream>

using namespace std;

int main() {

   int *ip_arr,n;//pointer name inp_arr and integer n to store the size.

   cin>>n;//size.

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

   ip_arr[i]=-1;//assigning -1 to every element.

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

  {

       cout<<ip_arr[i]<<" ";//printing every element.

  }

return 0;

}

output:-

100

-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1  

Explanation:

I am taking input of size.You should enter 100 for 100 values which have value -1.

You might be interested in
What is the most widely used operating system for mobile devices?
Alekssandra [29.7K]
Android, many phone brands use the Android OS. Unlike Apple, which is the only technology company with IOS.
8 0
3 years ago
Which is an acceptable practice when a photographer shoots in windy conditions?
VARVARA [1.3K]

Answer:

d) attach a bag of weights to the tripod

Explanation:

5 0
3 years ago
Why does it say error on that last line of code
wel

Answer:

i have no clue

Explanation:

8 0
3 years ago
Read 2 more answers
If a printer is not Wi-Fi capable, how can it be set up to provide the most reliable wireless printing
SCORPION-xisa [38]

Answer:

Well you can use bluetooth since it doesn’t require wifi and it would still work if your printing a file from your computer or your flash drive.

5 0
2 years ago
Read 2 more answers
Why don't I have friends?
Papessa [141]

Answer:

maybe you do not ask for them i will be your friend.

Explanation:

7 0
3 years ago
Read 2 more answers
Other questions:
  • Which access control principle limits a user's access to the specific information required to perform the currently assigned tas
    12·1 answer
  • Write a static method named anglePairs that accepts three angles (integers), measured in degrees, as parameters and returns whet
    10·1 answer
  • Briefly describe the client/server model.
    8·1 answer
  • Which of the following is not part of active listening?
    6·2 answers
  • Click on the _____ tab on the ribbon to open the backstage view.
    7·1 answer
  • 2 (01.01 LC)
    5·1 answer
  • Anybody know this question??
    8·1 answer
  • I WILL GIVE BRAINIEST ANSWER AND THANKS IF YOU ANDWER THIS QUESTION!!!!
    8·1 answer
  • What are the specifications for a mine shaft headgear ​
    10·1 answer
  • Why is my internet slow even though the speed test says it is fast
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!