Computers and Technology

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;}

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 17:30, yoyo9661
Under which key category do the page up and page down keys fall? page up and page down keys fall under the keys category.
Answers: 1
image
Computers and Technology, 23.06.2019 19:00, jacobbecker99
Choose the correct citation for the case which established the "minimum contacts" test for a court's jurisdiction in a case. select one: a. brown v. board of education of topeka, 347 u. s. 483 (1954). b. international shoe co. v. washington, 326 u. s. 310 (1945) c. haynes v. gore, 531 u. s. 98 (2000). d. international shoe co. v. washington, 14 u. s. code 336.
Answers: 1
image
Computers and Technology, 23.06.2019 19:30, carcon2019
Amitha writes up a one-page summary of a novel during her summer internship at a publishing company. when she reads over the page, she realizes she used the word “foreshadow” seven times, and she would like to reduce the repetition. which tool would best amitha solve this problem?
Answers: 3
image
Computers and Technology, 23.06.2019 22:30, kayelynn003
How many points do i need before i can send a chat
Answers: 1
Do you know the correct answer?
Below is the prototype for a function that takes two pointers to integer variables as its parameters...

Questions in other subjects:

Konu
English, 29.09.2019 16:30
Konu
Mathematics, 29.09.2019 16:30