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
kobusy [5.1K]
3 years ago
6

Define a function CoordTransform() that transforms its first two input parameters xVal and yVal into two output parameters xValN

ew and yValNew. The function returns void. The transformation is new = (old + 1) * 2. Ex: If xVal = 3 and yVal = 4, then xValNew is 8 and yValNew is 10.
Computers and Technology
2 answers:
Svetradugi [14.3K]3 years ago
8 0

Answer:

#include <iostream>

using namespace std;

void CoordTransform(int *xVal, int *yVal) {

// since we have passed x and y by adress:

// any change in xVal or yVal will also change the value of x and y

*xVal = (*xVal + 1) * 2;

*yVal = (*yVal + 1) * 2;

}

int main() {

int x, y;

// geting x from user

cout << "Enter x: ";

cin >> x;

// getting y from user

cout << "Enter y: ";

cin >> y;

// passing x and y to function CoordTransform() by adress.

CoordTransform(&x, &y);

cout << "new x: " << x << endl;

cout << "new y: " << y << endl;

return 0;

}

Explanation:

a pointer points to a memory location of the veraible so, when we pass a veriable by adress to a function, any change at that memory location also effect the value of the veriable that is local to the calling function.  

NISA [10]3 years ago
3 0

Answer:

#include <iostream>

using namespace std;

void CoordTransform(int *ptr1, int *ptr2);

int main()

{

   int xVal;

int yVal;

cout<<"please enter two valid integers";

cin>>xVal;

cin>>yVal;

CoordTransform(&xVal , &yVal);

int xValNew=xVal;

int yValNew=yVal;

cout<<xValNew<<yValNew;

   

   return 0;

}

void CoordTransform(int *ptr1, int *ptr2)

{

int a = *ptr1;

*ptr1=(*ptr1+1)*2;

*ptr2=(*ptr2+1)*2;

}

Explanation:

It will return new values in previously defined variables

coding language: c++

You might be interested in
The city government of Los Angeles recently upgraded its information technology infrastructure​ and, for the first​ time, implem
Maru [420]

Answer:

The correct answer to the following question will be Option A (Open source software).

Explanation:

It's a type of software which is open to all we can download that software by the free of cost. Wamp, Apache server is one of the example of the open source software.

Any software accessible for alteration which is circulated because of its source code is known as Open source software. Open source permissions influence the way technology is used, researched, updated, and circulated by individuals. In fact, it give permission to code users for using this software for whatever use might desire.

Which ensures it includes a developer authorization to modify the script in any manner they want to:

  • Developers will patch glitches.
  • Change features.
  • Modify the app to suit their needs.

No other software available for the alteration is available in the option. So, the proper answer is Option A.

8 0
3 years ago
Choose ALL guidelines listed below pertaining to fair use.
tino4ka555 [31]

Answer:

Introduction

As you write blog posts, you may find that you want to include images you find online. Or maybe you found a great piece of writing—a recipe, a story, or a review—that you want to highlight on your own blog. It's important to know that almost all of the content you find on the Web belongs to someone. Just because you can take images, text, and more from other sites doesn't mean it's right to do so—ethically or legally.

In this lesson, you'll learn about the copyright protections that apply to work posted online. You'll learn about the rules that determine which images and text you can use, and how you can use them. You'll also learn how to protect the content you create.

The laws discussed in this lesson are United States laws. No lawyer was involved in preparing this lesson. We are not legal experts, and this lesson should not be taken as legal advice.

Understanding copyright

Copyright is the legal concept that works—art, writing, images, music, and more—belong to the people who create them. According to copyright law, any original content you create and record in a lasting form is your own intellectual property. This means other people can't legally copy your work and pretend it's their own. They can't make money from the things you create either.

To use, copy, or change a copyrighted work, you need permission from the person who holds the copyright. This permission is called a license. Even though everyone has the right to require that others respect their copyright and ask permission to use their work, some people and organizations choose to license their content more freely. They do this by giving their work a Creative Commons license or by placing their work in the Public Domain.

6 0
3 years ago
Read 2 more answers
Nonverbal messages from the movie it​
RUDIKE [14]

Answer:

ya you say right

Explanation:

5 0
3 years ago
Read 2 more answers
Which of the following statements is not true? Group of answer choices
Nesterboy [21]

Answer:

A

Explanation:

Option A is not true because a Boolean variable type can hold one of two values only that is  (true/True or false/False).

All the other options given in the question are correct because

  1. A variable declaration refers to specifying its type and name
  2. If string variables are assigned a numeric values which is legal provided the values are enclosed in quaotes( " "), trying to carryout a mathematical operation like addition will result in string concatenation.
  3. The Variable name I_Love_to_eat_pizza is legal because it contains no special characters, doesn't start with a number and its not a reserved word in any language
4 0
3 years ago
The _______ is a small program run by a computer when first powered on. its primary function is to stabilize the machine and dev
tigry1 [53]
Hello <span>TheCelloAlex1645 </span>

Answer: <span>The BIOS is a small program run by a computer when first powered on. its primary function is to stabilize the machine and devices on the motherboard so that the operating system can be loaded and take control of the computer.


Hope this helps
-Chris</span>
3 0
3 years ago
Other questions:
  • What information is not typically included in an e-mail header?​?
    15·1 answer
  • What are some options available when using the Replace feature?
    13·1 answer
  • Driving is expensive. Write a program with a car's miles/gallon and gas dollars/gallon (both doubles) as input, and output the g
    7·2 answers
  • Which of the following statements is true of intrapreneurs
    15·1 answer
  • Question 1 Multiple Choice Worth 5 points)
    10·1 answer
  • Who created the first photograph
    9·2 answers
  • The function below takes two parameters: a string parameter: csv_string and an integer index. This string parameter will hold a
    5·1 answer
  • Is monitor is a television​
    5·2 answers
  • WHO WANT P O I N T S.................................................
    9·1 answer
  • The _________________ creates international guiding principles for computer forensic examiners.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!