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
Assume that another method has been defined that will compute and return the student's class rank (Freshman, Sophomore, etc). It
ladessa [460]

Answer:

Option (D) i.e., s1.getClassRank( ); is the correct option to the following question.

Explanation:

Here, in the following option, the object "S1" is the object of the class "rank" and "getClassRank( )" is the function of that class "rank". so, in the following code the function "getClassRank( )" is called through the class object which computes and returns the class rank of the students.

So, that's why the following option is the correct way to call the function.

8 0
3 years ago
In computer science, what is the name for a series of steps used to solve a problem?
liraira [26]

Answer:

Algorithm

Explanation:

It is the step by step procedure,which defines a set of instructions which is to be carried out by the computer

5 0
3 years ago
The process of making raw materials into a finished product is known as
Olin [163]
1.) Business Engineering or Manufacturing :)
<span />
6 0
3 years ago
Read 2 more answers
The ____ function displays the highest value in a range.
Monica [59]
Max()

------------------------------------------------------------
5 0
3 years ago
Read 2 more answers
Which of the following is a professional organization in the field of IT? Society for the Prevention of Cruelty to Animals (SPCA
Lelu [443]
(IEEE) Is the obvious answer ; no harshness meant in any way
7 0
3 years ago
Read 2 more answers
Other questions:
  • Assume arr2 is declared as a two-dimensional array of integers. Which of the following segments of code successfully calculates
    6·1 answer
  • THE DOMAIN IN AN EMAIL MESSAGE TELLS YOU THE
    11·1 answer
  • What are some of the potential sources of risk in a systems analysis and design project? How does the project manager cope with
    6·1 answer
  • Explain what occurs when you synchronize computer and mobile devices.
    5·1 answer
  • Integration Management, one of the 10 PMBOK Guide Knowledge Areas, represents the processes and activities to identify, define,
    12·1 answer
  • What are two types of formulas in Excel
    13·2 answers
  • We will pass in a value N. Write a program that outputs the complete Fibonacci sequence for N iterations. Important: If N is 0,
    13·1 answer
  • Suppose you are given a bag containing n unbiased coins. You are told that n − 1 of these coins are normal, with heads on one si
    7·1 answer
  • Which of the following database object hold data?
    13·2 answers
  • Consider our authentication protocol 4.0, in which Alice authenticates herself to Bob, which we saw works well (i.e., we found n
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!