subject

Below is the prototype for a function that takes two pointers to integer variables as its parameters. The purpose of the function is to exchange the values stored in the integer variables to which the two pointers point. Consider the proposed implementation code for this function and select all options that would correctly accomplish the intent of the function.
void exchange ( int p, int q );

A) void exchange( int p, int q ) {
p = q;
q = p;}
B) void exchange( int p, int q ) {
p = q;
q = p;}
C) void exchange( int p, int q ) {
int temp = *p;
p = q;
*q = temp;}
D) void exchange( int p, int q ) { int *temp = p; p = q; q = temp;}
E) void exchange( int p, int q ){ int temp = p; p = q; q = *temp;}

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 03:30
In vista and windows 7, the appearance and personalization option allows you to change the
Answers: 1
question
Computers and Technology, 23.06.2019 09:20
How to print: number is equal to: 1 and it is odd number number is equal to: 2 and it is even number number is equal to: 3 and it is odd number number is equal to: 4 and it is even number in the console using java using 1 if statement, 1 while loop, 1 else loop also using % to check odds and evens
Answers: 3
question
Computers and Technology, 23.06.2019 22:30
Janice usually works on a particular workbook that contains all business related data. she decides to keep a backup of all the data in a separate workbook. she opens a new workbook to transfer the data. which option should she use to copy all the data from one workbook to another workbook?
Answers: 1
question
Computers and Technology, 23.06.2019 22:30
Lakendra finished working on her monthly report. in looking it over, she saw that it had large blocks of white space. what steps could lakendra take to reduce the amount of white space?
Answers: 3
You know the right answer?
Below is the prototype for a function that takes two pointers to integer variables as its parameters...
Questions
question
Mathematics, 16.02.2022 06:50
Questions on the website: 13722363