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
alina1380 [7]
3 years ago
14

Given two int variables, i and j, which have been declared and initialized, and two other int variables, itemp and jtemp, which

have been declared, write some code that swaps the values in i and j by copying their values to itemp and jtemp respectively, and then copying itemp and jtemp to j and i respectively.
Computers and Technology
1 answer:
Diano4ka-milaya [45]3 years ago
3 0
<span>itemp = i; jtemp = j; i = jtemp; j = itemp; The above code example assumes that you're writing in C, C++, java, or some other language with similar syntax. Since all the variables i, j, itemp, and jtemp have the same type, you can simply assign one to another without having to worry about type compatability or conversions. When the 4 assignment statements have executed, i will have the original value of j, and j will have the original value of i, effectively swapping the two values between the two variables.</span>
You might be interested in
Write a programe to add two numbers using function with return type"void".
Grace [21]

Answer:

#include<iostream>

using namespace std;

//create the function which add two number

void addTwoNumber(int num_1,int num_2)

{

   int result = num_1 + num_2;  //adding

   

   cout<<"The output is:"<<result<<endl;  //display on the screen

}

//main function

int main(){

   //calling the function

   addTwoNumber(3,6);

   return 0;

}

Explanation:

First, include the library iostream for using the input/output instructions.

then, create the function which adds two numbers. Its return type is void, it means the function return nothing and the function takes two integer parameters.

then, use the addition operation '+' in the programming to add the numbers and store the result in the variable and display the result.

create the main function for testing the function.

call the function with two arguments 3 and 6.

then, the program copies the argument value into the define function parameters and then the program start executing the function.

6 0
4 years ago
What are two best practices for discovering whether a message you’ve scheduled with Hootsuite has failed to send?
never [62]
I think:
<span>  C)  Regularly check Publisher's 'Rejected' Tab  <span>D)  Enable email notifications for failed messages under Preferences</span></span>

But I am not sure.
4 0
3 years ago
Read 2 more answers
Why should you not remove a program by deleting its folder?
igomit [66]

Answer:

for the first six members in the series of alkenes plot the number of hydrogen atoms on they exist in use this number the graph to drive the formula of alkane that has 10 carbon atoms. i will give brain list

6 0
3 years ago
What is the function of the Enter key
spin [16.1K]

The enter key sends the cursor to the next line, or it executes a command or operation.

4 0
3 years ago
HTML tags normally come in pairs like and The end tag is written like the start tag, but with a backward slash inserted before t
baherus [9]

Answer:

<bold> Hm ok, what is the question? </bold>

4 0
4 years ago
Other questions:
  • Computer science
    6·1 answer
  • Assume each student is assigned an advisor from a department. Each classroom is assigned a classroom (class# determines Classroo
    14·1 answer
  • This decision control structure enables the program to execute a statement or block of codes if and only if the Boolean expressi
    7·1 answer
  • Which BEST identifies the primary function of the key words above?
    5·1 answer
  • How to make a Tip Calculator in code?
    12·1 answer
  • A teacher determines student percentages in a course as the points a student earns divided by the total points available in the
    9·1 answer
  • Convert ⅖ pie radian to degree​
    15·1 answer
  • What method do phishing and spoofing scammers use
    12·1 answer
  • Which of the following types of tasks are comparatively easy for artificial intelligent systems?
    13·1 answer
  • Scripting languages are unique computer languages with a specialized function. explain what scripting languages do, and how this
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!