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

You should take the third example program on the notes for April 18th and revers

ID: 3642434 • Letter: Y

Question

You should take the third example program on the notes for April 18th and reverse the string using pointers.
-------------------

Thrid example

// Program that illustrates how to read an array using pointers

#include <stdio.h>

void main()
{
char x[8] = {'s','t','r','e','s','s','e','d'};
char *ptr; /* pointer of type char */
ptr = x; /* assigns the addres of the
first element of the array to ptr */
int i = 0;
for (i = 0; i<8; i++)
{
printf("%c", *ptr);
ptr++; // points to the next element in the array
}
}

Explanation / Answer

What is your Question?? Confused

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