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
Aleksandr [31]
3 years ago
11

In C!!

Computers and Technology
1 answer:
lapo4ka [179]3 years ago
4 0

Answer:

#include <stdio.h>

void SwapValues(int* userVal1, int* userVal2)

{

int temp = *userVal1;

*userVal1 = *userVal2;

*userVal2 = temp;

}

int main(void)

{

int a = 3;

int b = 8;

printf("Before swap: a=%d, b=%d\n", a, b);

SwapValues(&a, &b);

printf("After swap:  a=%d, b=%d\n", a, b);

return 0;

}

Explanation:

For swapping variables efficiently, you need a helper variable in C or C++.

You might be interested in
A variable that can be modified from anywhere within a program is called a?
larisa86 [58]
A - a global variable
6 0
3 years ago
A U.S. social security number consists of a string of 9 digits, such as "444422333". Declare a char array named ssn suitable for
tatuchka [14]

Answer:

Since the question expect us to declare a C-string, the solution code is written in C as follows:

  1.    char ssn[9];
  2.    scanf("%s",ssn);

Explanation:

A C-String is a string written in C language. It is an array of characters. To declare a C-string, we use the keyword, <em>char </em>and then followed with the variable name + brackets and the number of characters in the string. For example, we can create a C-String for the SSN number as in Line 1.

To read standard input into the array, we can use C built-in function, <em>scanf(). </em>Just include a string placeholder, %s, and the variable<em> ssn </em>as arguments to <em>scanf()</em>. This will assign the string input by user to variable <em>ssn</em> as C-String.

8 0
3 years ago
What are the steps for adding an action button to a slide? Choose the correct answers from the drop-down menus. 1. First, go to
Marysya12 [62]

Answer:

insert, illustrations, click and drag, slide show

Explanation:

i got it right

7 0
2 years ago
Read 2 more answers
How has the development of personal computer hardware and software reversed some of the trends brought on by the industrial revo
Nadya [2.5K]
<span>There should be no need to have white-collar employers just next to factories thanks to the Information Revolution, and it enabled executives to stay in home, write documents, and send them easily.</span>
4 0
3 years ago
13. Microsoft PowerPoint is the best example of Multimedia Presentation
marissa [1.9K]

Answer:

Uhhh...ooop.........

7 0
3 years ago
Read 2 more answers
Other questions:
  • A ___ is the basic collective unit of data in a computer.
    12·1 answer
  • Role-playing, action, educational, and simulations are examples of computer and video game _____. Windows and Apple offer_____ ,
    13·1 answer
  • Eye wash stations should contain enough water to provide ______ minutes of continuous use
    5·2 answers
  • The relational database is the primary method for organizing and maintaining data today in information systems. It organizes dat
    9·1 answer
  • Please someone helpp
    12·2 answers
  • A user purchased a new smart home device with embedded software and connected the device to a home network. The user then regist
    5·1 answer
  • Can you be my friend plz
    9·1 answer
  • Complete the statement below using the correct term.<br>Website managers use<br>every day​
    11·2 answers
  • In numpy to append two arreys vertically the function __ is used
    12·2 answers
  • Suppose your team is finishing a project and the supervisor stresses ensuring the material cannot be erased. To what memory leve
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!