Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Your assignment is to write two C programs that manipulate arrays. Apart from the array declarations, your code MUST NOT use any notation anywhere in

image text in transcribed
Your assignment is to write two C programs that manipulate arrays. Apart from the array declarations, your code MUST NOT use any notation anywhere in these programs. All access to atray values MUST be done via pointers and pointer arithmetic. Download the file reverse.c from the course website. This file contains part of a program to do text reversing. The function main looks like this: int main() { char m[80]; int size = 0; printf("Enter the text: "); size = getLine (m); changeCap (m, size); printf("**************** reverse Text (m, size); return 0; The function getLine should read the input from the keyboard. The function returns the number of characters read. The function changeCap should capitalize the start of the each word in the text. To capitalize the first letter you can use the toupper() function is used to convert lowercase alphabet to uppercase. It is defined in the ctype.h header file. The function reverseText should reverse the text. The maximum number of characters to read is 80. If your input has more characters than that, the function should ignore the rest of the characters. Note that the array should not include a terminator character such as "0. (In other words, if you happen to be familiar with how C implements strings, forget about it. The text is NOT string.) Your job is to write these three functions. You must write them exactly as described. You are also welcome to write other functions you deem appropriate In all cases, your functions must not use any array notation -- everything must be done using pointers and pointer arithmetic

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Conceptual Database Design An Entity Relationship Approach

Authors: Carol Batini, Stefano Ceri, Shamkant B. Navathe

1st Edition

ISBN: 0805302441, 978-0805302448

More Books

Students also viewed these Databases questions

Question

Describe the patterns of business communication.

Answered: 1 week ago

Question

3. Provide two explanations for the effects of mass media

Answered: 1 week ago