

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


Lab Task 11.1 Write a function reverse() that reverses a C-string (an array of char). Use a for loop that swaps the first and last characters, then the second and next-to-last character and so on. Pass a string from main() to reverse() as an argument to reverse it. #include
Lab Task 11.2 Write a function compare() that will take two strings as arguments from main(). Compare these two strings whether they are equal or one is equal than other.