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
Whitepunk [10]
3 years ago
10

Dеclarе and allocatе mеmory (on thе hеap) for a onе-dimеnsional array of 256 doublеs namеd pricеs

Computers and Technology
1 answer:
Zigmanuir [339]3 years ago
4 0

Answer:

double *prices=new double [256];

Explanation:

To allocate memory on heap we use new keyword.In the above statement an array name prices is declared and the memory allocated to it is on the heap memory.

First look at double * prices.It is a pointer this pointer is created on the stack memory which holds starting address of the array present on the heap memory of size 256..

You might be interested in
Describe the two best practices for making html code more readable.
Strike441 [17]

Answer:

1 - Commenting and Documentation.

2 - Consistent Indentation.

3 - Avoid Obvious Comments.

4 - Code Grouping.

5 - Consistent Naming Scheme.

6 - DRY Principle.

7 - Avoid Deep Nesting.

8 - Limit Line Length.

Explanation:

Hope this helped

6 0
3 years ago
Write a program that reads the data from rawdata_2004.txt into a dictionary whose keys are country names and whose values are pe
san4es73 [151]

Answer:

import re

def country_capita():

   #opens file

   file=open("inputfile.txt", "r")

   dictionary=dict()

   #reads line by line

   for line in file.readlines():

       # substitutes for multiple space a single space

       line = re.sub(r"[\s]{2, }", ' ', line)

       list=[]

       #splits line on space

       list=line.split(" ")

       #put into dictionary

       dictionary[list[1]]=list[2]

#   get input

   while True:

       choice=input("Enter the country name or quit to exit: ")

       if choice=="quit":

           break

       elif choice in dictionary.keys():

           print(dictionary[choice])

       else:

           print("Invalid Country")

country_capita()

Explanation:

Using python to code this program. First we, (line 1) import the re module which offers us a set of functions that allows us to search a string for a match. ((line 2) Next we define a function country_capita() that will open rawdata_2004.txt, read the information within line by line and create a dictionary list. The we create a while loop with conditional statements that prompt the user to enter country names, print the corresponding values and stops when the user enters quit.

7 0
3 years ago
Read the following examples, and decide whether each example describes a relational database or a flat
bezimeni [28]

Answer: flat file, relational database, relational database, relational database

Explanation:

Edge

7 0
3 years ago
Read 2 more answers
Modern fax machines use _______ to transmit text.
KatRina [158]
Modern fax machines use senors to transmit text.
hope this helps:)
3 0
4 years ago
Read 2 more answers
Fourlotts Corp. provide integrated services that include storing manufactured goods, packaging, and delivering it to the dealers
PilotLPTM [1.2K]

Answer:

The answer is "Logistics provider of third parties".

Explanation:

In the given statement some information is missing, that is options, which can be described as follows:

a.Center for Allocation

b. Logistics provider of third parties

c. supplier

d. Manufacturer with contracts

The company provides contracted logistics facilities provided by any part of the sourcing and distribution operations. In the 3PL will have a specific definition for any service agreement requiring processing or shipment of goods, and certain choices were wrong, which can be explained as follows:

  • In option a, It includes products and services.
  • In option b, It is a person that provides the products.
  • In option d, It enables the customer to get off an incredibly important project, that saves a lot of cash.

7 0
3 years ago
Other questions:
  • Sam has been asked to classify a number of different processing systems that his consultancy's client uses.
    9·1 answer
  • Reserve space in memory for a variable called UIN of size word. The initial value of UIN will be the sum of the digits in your U
    6·1 answer
  • Please help!!!!<br> Data means only facts. <br> A. TRUE B. FALSE
    14·1 answer
  • A computer’s BIOS is defined as the
    12·2 answers
  • If you were looking for a record in a very large database and you knew the ID number, which of the following commands would be t
    10·1 answer
  • Here is free points im leaving
    11·2 answers
  • I hack3d into my schools computer system to unblock everything but now I am scared that I am going to get caught so I want to de
    13·2 answers
  • What sort of technique would you use to sort 10,000 items using just 1000 available slot in your RAM?
    6·1 answer
  • WILL GIVE BRAINLEIST PLZ HELP PLZ AND THANK YOU
    7·1 answer
  • Assume you're using a three button mouse.To access shortcut menus,you would
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!