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
Helga [31]
4 years ago
9

Assume that a new type called POINT has been defined-- it is a structure consisting of two fields, x and y , both of type double

. Assume two variables p1 and p2 of type POINT have been declared . Assume that p1 has already been initialized . Write some code that makes p2 the reflection of p1 : in other words, give p2's x field the value of p1's y field, and give p2's y field, the value of p1's x field.
Computers and Technology
1 answer:
Studentka2010 [4]4 years ago
5 0

Answer:

The code to this question can be given as:

Code:

p2.x=p1.y;

p2.y=p1.x;

Explanation:

In the question, it is given that a different type of POINT has been declared that is consisting of two arguments that are x, y. both variable datatype is double and variable p1, p2 are new points that have been declared. In that p1 variable has already been initialized that makes p2 the reflection of p1. So the code can be given above. In this p2.x variable holds the value of the p1.y and p2.y variable holds the value of p1.x.

You might be interested in
You are between flights at the airport and you want to check your email. Your wireless settings show two options:
Likurg_2 [28]
The correct answers Is B
8 0
3 years ago
If you reformat the hard drive on a computer, it erases all personal information from your computer and makes it safe to donate.
melamori03 [73]
The answer would be false
8 0
4 years ago
What happens in the development phase of the software development life cycle?
Olin [163]

Answer: Planning the solution, look and feel of the software interface

5 0
2 years ago
With a _____ network connection, the computers and other devices on the network are physically connected via cabling to the netw
Lostsunrise [7]
Wired
........................
6 0
3 years ago
Three reasons why users attach speakers to their computers.
ZanzabumX [31]

Answer:

Iv'e answered this question 2 times already lol. The purpose of speakers is to produce audio output that can be heard by the listener. Speakers are transducers that convert electromagnetic waves into sound waves. The speakers receive audio input from a device such as a computer or an audio receiver.

Explanation: I hope this helps!

8 0
3 years ago
Other questions:
  • How do you do these questions? The first two questions could have multiple answers and the third is one answer only.
    7·1 answer
  • I need help please!!?
    11·2 answers
  • 4-One possible performance multiplication enhancement is to do a shift and add instead of an actual multiplication. Since 9 * 6,
    12·1 answer
  • Assume that two arrays are parallel. Assume the first array contains a person's id number and the second contains his or her age
    5·1 answer
  • The various protocols in use on the internet are said to operate in layers in which the protocol(s) at each layer solve one prob
    5·2 answers
  • Write a function called add_tuples that takes three tuples, each with two values, and returns a single tuple with two values con
    7·1 answer
  • If consumers start to believe they need a product, what is likely to happen
    15·1 answer
  • The value that decides whether something falls into one category or another is called a ____
    13·1 answer
  • Ceteris paribus, if a student could either earn money tutoring or working as a server in a restaurant, then increases to the wag
    5·1 answer
  • 4. Cash inflows from investing activities normally arise from all of the following EXCEPT
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!