

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Two c programming lab tasks. The first task requires writing a reverse() function to reverse a given string using a for loop and character swapping. The second task involves writing a compare() function to determine if two given strings are equal or not. These functions can be passed strings from the main() function for processing.
Typology: Assignments
1 / 2
This page cannot be seen from the preview
Don't miss anything!


Lab task 14.1 Write a function Reverse () that reverse a C-string (an array of char). Use a for loop that swap the first and last character , then the second and next to the last character and so on pass a string from main() function to Reverse() function an arguments to reverse it.
Lab Task 14.2 write a function compare () that will take two string as an arguments from main (). Compare these two string whether they are equal are not.