Questions tagged [swap]

The tag has no usage guidance.

3 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
0
votes
0answers
23 views

Pset4 Filter/Less Reflect Not Working Properly

I tried this: // Reflect image horizontally void reflect(int height, int width, RGBTRIPLE image[height][width]) { RGBTRIPLE temp[height][width]; RGBTRIPLE reflection[height][width]; struct ...
0
votes
1answer
17 views

How to swap strings?

The main problem comes when we swap strings of unknown lengths. Lets say we have two strings assigned to two variables say a, b. Now if I use a temporary string say c, and use strcpy(c,a), then use ...
0
votes
0answers
305 views

Swap function in helpers.c file

I have successfully completed the linear search and sort functions in the helpers.c file for problem set 3. I included the swapping steps within the sort function directly and everything worked ...