Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

Hi! I am struggling with part 5 of my lab. After I return the string it I cant get it to print. It works on

image text in transcribedimage text in transcribedimage text in transcribed

Hi! I am struggling with part 5 of my lab. After I return the string it I cant get it to print. It works on online c compiler, but not on the terminal. My code need to work on the terminal to get credit. Please help thanks!

1. (8 points) Main function - calls other functions 2. (12 points) Function to get the length of a string 3.(12 points) Function to test if a char is lower case (Hint: for charc, C >= 'a' works) 4. (20 points) Function to convert a lower case char to uppercase (Hint: Look at positions in ASCII table) 5.(12 points) Function to get string from keyboard. Hint: scanf will not work for strings with spaces. Google gets() and make sure that the string is sufficiently large to contain reasonable size input. 1 #include char* accept_string(char s[10]); 3. int main(){ char str[10]; char* s = accept_string(str); printf("print string %s",s); printf(" "); 9. char* accept_string(char s[10]){ char str[10]; printf("Please enter string "); scanf("%[^ ]%* c",str); s = str; return s; Please enter string hi hello print string hi hello Please enter string hi hello print string

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

Programming The Perl DBI Database Programming With Perl

Authors: Tim Bunce, Alligator Descartes

1st Edition

1565926994, 978-1565926998

More Books

Students explore these related Databases questions

Question

=+nk so that p( B(k)) Answered: 1 week ago

Answered: 3 weeks ago