subject

C++

1) Pointer basics

a) Declare two (type double) pointer variables named d_var and d_array:

b) Write C++ statements to dynamically create a double-precision floating-point variable and store its address in d_var. Also dynamically create an array of 10 double-precision floating-point values and store its address in d_array:

c) Write C++ statements to input a value for d_var (i. e., a value that d_var points to) from the console and then display it:

d) Write C++ statements to initialize the 10 double values in the dynamically allocated array to 1.0 :

e) Now write C++ statements to de-allocate the memory (i. e. using the delete operator) pointed by d_var and d_array

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 10:30
You are almost finished updating a web site. as part of the update, you have converted all pages from html 4.0 to html5. the project is currently on schedule. however, your project manager has been asked by the marketing team manager to justify a day of time spent validating the site's html5 pages. the marketing team manager does not have technical knowledge of the internet or the web. which is the most appropriate explanation to provide to the marketing team manager?
Answers: 1
question
Computers and Technology, 22.06.2019 23:30
What are some ways to use a range name in a formula? check all that apply. in the defined names group, click use in formula, and then select the desired name. begin typing the name in the formula, select a name from the autocomplete list, and use the arrow keys and tab key to enter the name in the formula. begin typing the formula, and then click and drag with the mouse to select the cells to include in the formula. right-click one of the cells in the range. click formula options, and use the dialog box to add the name.
Answers: 1
question
Computers and Technology, 23.06.2019 14:30
Choose the answers that best complete each sentence. on average,are more expensive than other kinds of postsecondary schools. the cost of room and board includes. to save money, some students attend auniversity in their home state.
Answers: 2
question
Computers and Technology, 24.06.2019 01:30
Could you find out how im still getting an 83 percent on this in edhesive a = input("enter an animal: ") s = input ("enter a sound: ") e = "e-i-e-i-o" print ("old macdonald had a farm, " + e) print ("and on his farm he had a " + a + "," + e) print ("with a " + s + "-" + s + " here and a " + s + "-" + s + " there") print ("here a " + s+ " there a " + s) print ("everywhere a " + s + "-" + s ) print ("old macdonald had a farm, " + e)
Answers: 2
You know the right answer?
C++

1) Pointer basics

a) Declare two (type double) pointer variables named...
Questions
question
Mathematics, 24.05.2021 05:40
question
Spanish, 24.05.2021 05:40
question
Mathematics, 24.05.2021 05:50
question
Mathematics, 24.05.2021 05:50
question
Mathematics, 24.05.2021 05:50
question
Mathematics, 24.05.2021 05:50
question
Mathematics, 24.05.2021 05:50
question
English, 24.05.2021 05:50
question
Mathematics, 24.05.2021 05:50