Offline4 Pointers
Offline4 Pointers
Offline 4: Pointers
Constraints:
• Do not use array of some predefined size. Use pointer arithmetic and
dynamic memory allocation. You can only use two dynamically allocated
arrays; one for input string and another for output string. No additional arrays
can be used.
• You must write a function named void reverseWords(char *a, char *t)
where char *a is the input string and char *t is the output string.
• Array indexing notation is not allowed. (i.e., you must use *(p + i) instead of
p[i]).
Submission Guidelines:
1. Go to a drive except C drive.
2. Create a folder according to your roll number. Ex- 2305xxx.
3. Open up the folder and create two files there. Ex- 2305xxx-1.c, 2305xxx-2.c.
4. Place all the code inside the two .c files.
5. Zip the folder and submit it in the moodle.