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
expeople1 [14]
3 years ago
7

When creating a multi-dimensional array dynamically in C/C++ the Memory Manager will go to great pains to make sure the array is

completely contiguous with each row followed immediately by another row in the array. The goal is to keep all the data together in memory rather than "wherever it fits." A. True B. False
Computers and Technology
1 answer:
yuradex [85]3 years ago
8 0

Answer:

Here the statement is false.  

Explanation:

In C/C++, we can define multidimensional arrays in simple words as an array of arrays. Data in multidimensional arrays are stored in tabular form (in row-major order).  

General form of declaring N-dimensional arrays:  

data_type  array_name[size1][size2]....[sizeN];  

data_type: Type of data to be stored in the array.  

          Here data_type is valid C/C++ data type

array_name: Name of the array

size1, size2,... ,sizeN: Sizes of the dimensions.

Foe example:

Two dimensional array:

int two_d[10][20];  

Three dimensional array:

int three_d[10][20][30];

You might be interested in
Implement the following logic in C++, Use appropriate data types. Data types are represented as either numeric (num) or string.
ICE Princess25 [194]

Answer:

Follows are the modified code in c++ language:

#include<iostream>//header file

#include<string>//header file

using namespace std;

int main()//main method

{

string name,address, MSG_YES, MSG_NO;//defining string variable

int item,quantity,size=6, i=0;//defining integer variable

double price;//defining double variable  

int VALID_ITEM[]={106,108,307,405,457,688};//defining integer array and assign value

double VALID_ITEM_PRICE[]={0.59,0.99,4.50,15.99,17.50,39.00};//defining double array and assign value

bool foundIt=false;//defining bool variable  

MSG_YES="Item available";//use string variable to assign value

MSG_NO = "Item not found"; //use string variable to assign value

cout<<"Input name: ";//print message

cin>>name;//input value in string variable

cout<<"Input Address: ";//print message

cin>>address;//input value in string variable

cout<<"Input Item: "<<endl;//print message

cin>>item;//input value in string variable

cout<<"Input Quantity: "<<endl;//print message

cin>>quantity;//input value in string variable

while(i <size)//defining while that checks i less then size  

{

if (item ==VALID_ITEM[i]) //use if block to match item in double array

{

foundIt = true;//change bool variable value

price = VALID_ITEM_PRICE[i];//hold item price value in price variable  

}

i++;//increment the value of i

}

if (foundIt == true)//use if to check bool variable value equal to true

{

cout<<MSG_YES<<endl;//print value

cout<<"Quantity "<<quantity<<" at "<<"Price "<<price<<"each"<<endl;//print value

cout<<"Total"<<quantity*price;//calculate the total value

}

else//else block

cout<<MSG_NO;//print message  

}

Output:

please find the attached file.

Explanation:

In the above given C++ language modified code, four-string variable " name, address, MSG_YES, and MSG_NO", four integer variable "item, quantity, size, and i", and "integer and double" array is defined, that holds values.

In the string and integer variable "name, address, and item, quantity", we input value from the user-end and use the while loop, which uses the if block to check the "item and quantity" value from the user end and print its respective value.

6 0
4 years ago
Write an overloaded constructor for the Table class that will take a single argument for the color of the table Write a set meth
creativ13 [48]

Explanation:

Below is required code in java :-

public class Table{

   private String color;    //attribute to store the color of the table

   public Table(){    //default constructor

       this.color="";   //set a default blank color

   }

   public Table(String color){    //overloaded constructor

       this.color=color;    //set the color value equal to the parameter provided

   }

   public void setColor(String color){    //setter or mutator method

       this.color=color;    //set the color value equal to the parameter provided

   }

}

8 0
3 years ago
To copy and paste from an excel workbook to a word document, you must first
Firlakuza [10]
Select the cells to copy. Then push CNTL+C to copy them. Next, click the cells you want to paste in. Finally, push CTRL+v to paste
5 0
3 years ago
Normal view
Amiraneli [1.4K]
Normal View is the place where creating and editing occurs slide panel. This is where you can write or edit kind of information or images you wanted to show in your power point presentation. 
3 0
3 years ago
Read 2 more answers
What are the benefits of writing functions that use parameters and return? Try to list at least two.
lana66690 [7]

Answer:

Explanation:

Writing functions that use parameters and return helps improve code readability and manages complexity by reusing code.

6 0
3 years ago
Other questions:
  • A _____ attack keeps the target so busy responding to a stream of automated requests that legitimate users cannot get in
    9·1 answer
  • What do reservations do?
    15·1 answer
  • Assuming x and y are variables of type float, the expression:
    6·1 answer
  • Which parts of the forebrain are sometimes described as the “executive center” and can be likened to the central processing unit
    9·1 answer
  • What is the purpose of interrupts? How does an interrupt differ from a trap? Can traps be generated intentionally by a user prog
    11·1 answer
  • 1000base-t is a standard for achieving throughputs ____ times faster than fast ethernet over copper cable.
    8·1 answer
  • Savings accounts usually offer _________ interest rates than checking accounts. It is _________ to access your money in a saving
    10·2 answers
  • What is the range for copper tape
    15·1 answer
  • What is computer? Write is features <br><br><br><br><br>​
    14·1 answer
  • Identify some possible delivery systems for video programs
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!