Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

We have our final tomorrow and my teacher said we dont have to right the int fun

ID: 3695467 • Letter: W

Question

We have our final tomorrow and my teacher said we dont have to right the int functions or int main i forget but its one of them. Doesnt that mean we don't have to write the entire code but mostly some of it?

for example:

Question 5. Write a swap function that accepts two char arrays only. Function should swap the values stored in the arrays. See the example below: If the two character arrays are A: “suman” and B: “Ben”, the new value of A and B should A = “Ben”, and B: “Kumar”. Do not use any string function.                                                                   [8]

ANSWER:

void swap(char A[],char B[]);

     char A[10],B[10];

     cout<<"Enter the first string:";

     cin>>A;

     cout<<"Enter the second string:";

     cin>>B;

     swap(A,B);

     cout<<"The arrays after swapping is:"<<endl;

     cout<<"A:"<<A<<" "<<"B:"<<B << endl;

     return 0;

would this be correct.

Explanation / Answer

yes , that was correct

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote