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
QveST [7]
4 years ago
8

Look at the following code.int x = 7;int *iptr = &x;What will be displayed if you send the expression *iptr to cout ? What h

appens if you send theexpression ptr to cout ?
Computers and Technology
1 answer:
masha68 [24]4 years ago
4 0

Answer:

The answer to the given question can be given as:

The value of *iptr is 7. and the value of iptr is dynamic.

Explanation:

In the c++ code, it is defined that x is an integer variable that assigns a value which is 7. Then we define a pointer variable that is *iptr. This variable holds an address of the x variable. When we print the value of the iptr variable. if we use the expression *iptr to print value of the pointer variable by cout that is used in c++ for pint values. so the value of the iptr is 7. If we use the expression iptr sent to cout so we show the address of the variable x. In the pointer, it manages the addresses of dynamically allocated so the address of the variable is changed on execution time.

You might be interested in
Help me please thankyou was
sweet [91]

Answer:

Macros

Explanation:

The Macros extensions is used to dave time on repetitive tasks and standardize document formats.

7 0
3 years ago
Change the function definition for myint so that xyzfunc uses the same memory locations for myint as in the calling program.
sattari [20]

Answer:

b) void xyzfunc (int &myint);

Explanation:

To use the same memory location as the variable in the calling function we have to pass the variable by reference means passing the same address to the function.So to do that we have use & operator which stands for address.

We will do this as following:-

void xyzfunc (int * myint);

Hence the answer is option b.

8 0
4 years ago
Who ever can get me the lyrics to raining tacos will get 46 points + the crown! i want the song!
GenaCL600 [577]

Explanation:

Lyrics

It's raining tacos

From out of the sky

Tacos

No need to ask why

Just open your mouth and close your eyes

It's raining tacos

It's raining tacos

Out in the street

Tacos

All you can eat

Lettuce and shells

Cheese and meat

It's raining tacos

Yum, yum, yum, yum, yumidy yum

It's like a dream

Yum, yum, yum, yum, yumidy yum

Bring your sour cream

Shell

Meat

Lettuce

Cheese

Shell

Meat

Lettuce

Cheese

Shell

Meat

Cheese, cheese, cheese, cheese, cheese

It's raining tacos

Raining tacos

Raining tacos

It's raining tacos

It's raining tacos

Raining tacos

Raining tacos

Shells, meat, lettuce, cheese

It's raining tacos

It's raining tacos

8 0
3 years ago
Read 2 more answers
k- Add the code to define a variable of type 'double', with the name 'cuboidVolume'. Calculate the volume of the cuboid and set
djverab [1.8K]

Answer:

Here is the JAVA program to calculate volume of cuboid:

import java.util.Scanner; // Scanner class is used to take input from user

public class CuboidVol { // class to calculate volume of cuboid

public static void main(String[] args) { // start of main() function body

Scanner input= new Scanner(System.in); //create Scanner class object

// prompts user to enter length of cuboid

System.out.println("Enter the cuboid length:");

double length=input.nextDouble(); //reads the input length value from user

// prompts user to enter width of cuboid

System.out.println("Enter the cuboid width:");

double width=input.nextDouble(); //reads the input width from user

// prompts user to enter height of cuboid

System.out.println("Enter the cuboid height:");

double height=input.nextDouble(); //reads the input height from user

/* the following formula is to calculate volume of a cuboid by multiplying its length width and height and a double type variable cuboidVolume is defined to store the value of the resultant volume to it */

double  cuboidVolume= length*width*height; //calculates cuboid volume

//displays volume of cuboid and result is displayed up to 2 decimal places

System.out.printf("Volume of the cuboid (length " + length + "/ height " + height + "/ width" +width +" is: " + "%.2f",cuboidVolume);   } }

Explanation:

The formula for the volume of a cuboid is as following:

Volume = Length × Width ×  Height

So in order to calculate the volume of cuboid three variable are required for length, width and height and one more variable cuboidVolume to hold the resultant volume of the cuboid.

The program is well explained in the comments added to each statement of the program. The program prompts the user to enter the value of height width and length of cuboid and the nextDouble() method is used to take the double type input values of height length and width. Then the program declares a double type variable cuboidVolume to hold the result of the volume of cuboid. Then the last printf statement is used to display the volume of cuboid in the format format "Volume of the cuboid (length  / height  / width ) is" and the result is displayed up to 2 decimal places.

The screenshot of the program along with its output is attached.

7 0
3 years ago
Select all that apply.
professor190 [17]
Social worker and legal aid worker

4 0
3 years ago
Read 2 more answers
Other questions:
  • At the top level of a tree is a single node called the ________ a)pinnacle b) root c) top d)front
    12·1 answer
  • Why are the relational operators called relational?
    15·2 answers
  • Which command on the page layout ribbon enables a user to mark where a new page will begin on the printed copy?
    6·1 answer
  • Hello im looking for someone to answer my question. Its about a coding project called "Quiz Master". Im having trouble with the
    7·1 answer
  • Why is it important to think about the programming language to use?
    8·1 answer
  • To download your presentation as pictures, choose this option.
    9·2 answers
  • Examples of pop in computer​
    14·1 answer
  • You are the PC technician for a company. An employee has gone to a meeting while you fix the computer in her office. She acciden
    15·1 answer
  • Which option in PowerPoint allows users to configure the number of columns and rows manually, using numerical values?
    6·1 answer
  • you are a new lenovo service provider and need to use the recovery utility information on the lenovo support website. this infor
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!