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
Pachacha [2.7K]
3 years ago
5

In the code segment below, assume that the int variable n has been properly declared and initialized. The code segment is intend

ed to print a value that is 1 more than twice the value of n.
/* missing code */

System.out.print(result);

Which of the following can be used to replace /* missing code */ so that the code segment works as intended?

int result = 2 * n;
result = result + 1;
int result = n + 1;
result = result * 2;
int result = (n + 1) * 2;


I only
A


II only
B


III only
C


I and III
D


II and III
E

























































Submit
Computers and Technology
1 answer:
Bumek [7]3 years ago
5 0

Answer:

dkidjejfkgkkfhsbshfkkfjvuxysy

You might be interested in
A data analyst uses _____ to decide which data is relevant to their analysis and which data types and variables are appropriate
tester [92]

Answer:

I believe that the answer is a database organization.

3 0
1 year ago
Instructions:Select the correct answer.
exis [7]
The correct answer is D. time management
hope i was able to be of use ^^

7 0
3 years ago
Define a function CoordTransform() that transforms the function's first two input parameters xVal and yVal into two output param
gogolik [260]

Answer:

Here is the function CoordTransform() that transforms the function's first two input parameters xVal and yVal into two output parameters xValNew and yValNew

void CoordTransform (int xVal ,int yVal ,int& xValNew, int& yValNew) { //function definition

xValNew = (xVal +1) *2; // adds 1 to old value (xVal) , multiplies the result by 2 and assigns that new value to xValNew

yValNew = (yVal +1) *2; } // adds 1 to old value (yVal) , multiplies the result by 2 and assigns that new value to yValNew

Explanation:

Here is the complete program:

#include <iostream> //to use input output functions

using namespace std; // to access objects like cin cout

void CoordTransform (int xVal ,int yVal ,int& xValNew, int& yValNew) { //function that takes four arguments

xValNew = (xVal +1) *2; // computes new value and assigns it to xValNew

yValNew = (yVal +1) *2;} // computes new value and assigns it to yValNew

int main() { // start of main function

//declares 4 int type variables xValNew, yValNew, xValUser, yValUser

int xValNew;

int yValNew;

int xValUser;

int yValUser;

cin >> xValUser; // takes value of xValUser from user

cin >> yValUser; // takes value of yValUser from user

CoordTransform(xValUser, yValUser, xValNew, yValNew); //function call

cout << "(" << xValUser << ", " << yValUser << ") becomes (" << xValNew << ", " << yValNew << ")" << endl; //prints the old and new values

return 0;}

In this program the function CoordTransform receives a reference to a variables  xValNew and yValNew so that it can modify the values of these variables. So  xValNew and  yValNew variables are declared as reference so they become an alternative name for the variables xValNew and  yValNew used in main() method . These variables are declared as reference in the function CoordTransform() by placing ‘&’ symbol in the declaration.

Suppose user enters 3 as value of xValUser and 4 as  value of yValUser

Now when the function  CoordTransform() is called it works as follows:

xValNew = (xVal +1) *2; this statement becomes:

xValNew = (3 + 1) * 2

xValNew = 4 * 2

xValNew = 8

Now this value is assigned to the xValNew of calling function (main) xValNew variable.

yValNew = (yVal +1) *2;

this statement becomes:

yValNew = (4 + 1) * 2

yValNew = 5 * 2

yValNew = 10

Now this value is assigned to the yValNew of calling function (main) yValNew variable.

So the output of the above program is:

(3, 4) becomes (8, 10)          

4 0
3 years ago
Drag the correct type of update to its definition.
iris [78.8K]

PRI – The connection between mobile tower and radio tower  

PRL – List of Radio frequencies  

Baseband – The chip that controls the radio frequency waves within the device.  

Explanation:

PRI :

• Stands for Primary rate interface.  

• Consists of information pertaining to ID number, network code, country code, etc, to enable the user to connect to the right network

• Gets updated from time to time.

PRL:

• Stands for Preferred Roaming List :

• Contains list of radio frequencies from various geographic location

• Used in CDMA network

• Contains information pertaining to service provider id, radio bands, sub bands, etc.

Baseband:

• Controls GSM and 3G Phone RF waves

4 0
3 years ago
The ability to learn a new computer software program is to ____________ as knowledge of state capitals is to _____________.
Montano1993 [528]
<span>The ability to learn a new computer software program is to ADAPT as knowledge of state capitals is to COMMIT. Learning something new is to adapt and take time to study and learn what needs to be done in order for the task you wish to happen. To have knowledge of a specific thing, is to committing that face to your memory.</span>
8 0
3 years ago
Other questions:
  • The speed of a cpu is expressed in cycles called ________.
    14·1 answer
  • Is the protocol that specifies how web browsers and servers communicate.?
    11·1 answer
  • What are some examples for Environmental Technology?
    5·2 answers
  • What are the five layers in the internet protocol stack? What are the principal responsibilities of each of these lay?
    9·1 answer
  • Suppose Alice and Bob are sending packets to each other over a computer network. Suppose Trudy positions herself in the network
    8·1 answer
  • to _________________________ is a mouse operation in which you move the mouse until the pointer on the desktop is positioned on
    7·1 answer
  • How many lines of text are in your questionnaire document
    5·1 answer
  • Write a program code to accept the names of 3 users and generate a user name as shown in the example. Accept the name of 3 user
    9·1 answer
  • Setting up a desktop computer for anAutoCADspecialist who needs a minimum of 125 GBram which operating system would be the best
    5·1 answer
  • Explain what a datalist element does and is used for.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!