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
Sites like Zillow get input about house prices from a database and provide nice summaries for readers. Write a program with two
Alexeev081 [22]

Answer:

In Python:

cprice= int(input("Current price: "))

lmonth= int(input("Last month's price: "))

print("This house is $"+str(cprice))

print("The change is $"+str(cprice-lmonth)+" since last month")

print("The current mortage $"+str((cprice * 0.051) / 12)+" since last month")

Explanation:

Get current price

cprice= int(input("Current price: "))

Get last month's price

lmonth= int(input("Last month's price: "))

Print the current price

print("This house is $"+str(cprice))

Print the change

print("The change is $"+str(cprice-lmonth)+" since last month")

Print the mortgage

print("The current mortage $"+str((cprice * 0.051) / 12)+" since last month")

8 0
2 years ago
What do conditions do for programs?
Luba_88 [7]

Answer:

add versatility thank you

7 0
1 year ago
Which of these is system software? Check all
Darya [45]

Answer:

Windows OS is software....

6 0
2 years ago
John works as a sales representative with Northwind Traders. He has to make a presentation to his customers in another town. The
Sphinxa [80]

Answer:

Laptop.

Explanation:

In the following scenario, John works in the company as the sales representative and he creates a presentation for his users who belongs to another town. The following presentation contains 10GB storage and he also modifying his presentation at the time of traveling.

So, It is clear that he is not using the Mainframe, PDA, or any other desktop computer, he will using his Laptop.

8 0
2 years ago
Should spreadsheets be used to capture the results of a science experiment?<br><br> YES<br> NO
Lyrx [107]

Answer:

Yes

Explanation:

Spreadsheets should be used to capture the results of science experiments because they are good for sorting data. They make results easier and information easier to see and use.

3 0
1 year ago
Read 2 more answers
Other questions:
  • How does applying Fontworks effects to text on an advertising flyer change the text?
    8·1 answer
  • Which one is correct?
    7·2 answers
  • The expressions in each part of an AND or OR expression use ________ evaluation; that is, they are evaluated only as much as nec
    9·1 answer
  • Suppose you are an ISP that owns a / 22 IPv4 address block. Can you accommodate requests from six customers who need addresses f
    8·1 answer
  • Computer programming is an essential skill for anyone wishing to pursue a career in cybersecurity. What might be a good ""first
    13·1 answer
  • A mail merge data source must contain
    15·1 answer
  • Image-editing software is used to_____
    7·1 answer
  • What is the purpose of the new window command
    6·1 answer
  • Write a function named enterNewPassword. This function takes no parameters. It prompts the user to enter a password until the en
    6·1 answer
  • Choose the missing words in the code below.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!