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, 22.06.2019 18:30
Kto rozmawia z clamentain przez krótkofalówke w the walking dead w 4 epizodzie
Answers: 1
question
Computers and Technology, 23.06.2019 10:00
Hey i just logged on and one of the moderators deleted a bunch of my answers to questions, even though the answers were right and the people it doesn't make sense but if anyone wants to talk about anything just message me lol (this is super random lol)
Answers: 1
question
Computers and Technology, 23.06.2019 11:30
Me dangers of social media and the internetexplain what each means: 1) social media and phones have become an addiction.2) outside people have access to you all the time.3) cyberstalking4) cyberbullying5) catphishing6) viruses7) identity theft8) credit card fraud9) hacking10) money schemes
Answers: 1
question
Computers and Technology, 23.06.2019 15:00
In the blank libreoffice writer document, to start the process of entering a date field into a letter, click on the insert menu. edit menu. file menu. fields menu.
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