Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need the following done in C programing Print Backwards In a file named tnirp.c Write a function void tnirp(char s[1); which takes a string

I need the following done in C programing

image text in transcribed

Print Backwards In a file named tnirp.c Write a function void tnirp(char s[1); which takes a string s as a parameter and prints the characters of s in reverse order. Only characters up to the first '10' or the first ' ' should be included, and a newline character 'n' should be printed at the end Now write a main) function with the following contents #define MAXLENGTH 20 - int main(int argc, char argv[) char s [MAX_ LENGTH printf ("Enter String ") // fgets returns NULL if it gets only a ctrl d if( fgets(s,MAX-LENGTH, stdin) != NULL ){ tnirp(s) return EXIT_SUCCESS; Here's how the input and output of your program should look: ./tnirp Enter String: tnirp print ./tnirp Enter String: How now brown cow! woc nworb won WoH ./tnirp Enter String: The quick brown fox jumped over the lazy dog xof nworb kciuq ehT

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_2

Step: 3

blur-text-image_3

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

Professional Microsoft SQL Server 2014 Administration

Authors: Adam Jorgensen, Bradley Ball

1st Edition

111885926X, 9781118859261

More Books

Students also viewed these Databases questions