Question: Must be done in c99. Write a program called reverse_half.c that reads a message, then prints the reversal of the first half of the message.

Must be done in c99.

Write a program called reverse_half.c that reads a message, then prints the reversal of the first half of the message. Given a message of size n (every character in the message counts), the first half of the array would end at index n/2 (regardless of whether the array is an odd or even size). A message will have at most 100 characters.

Example:

 Enter a message: Don't get mad, get even. Reversal of first half: am teg t'noD 

*Your program MUST use pointers and NOT integer array indices (i.e., a[1], a[5] etc.) to process the character array!

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!