Question: Can this please be done in C programming 11.13 Lab Week 12: Character Input and Pointers 1) Prompt the user to enter a sentence 2)

Can this please be done in C programming

Can this please be done in C programming 11.13 Lab Week 12:

11.13 Lab Week 12: Character Input and Pointers 1) Prompt the user to enter a sentence 2) read in AT MOST 80 characters of the sentence the user entered 3) call function parselnput that will go through the input looking for a space and create pointers to each character after the space 4) print out the number of words in the sentence (that was at most 80 characters) and the characters that the pointers reference The idea User inputs: A long sentence that will get us started on the lab so that we can see what is really going on here Your code should only read in A long sentence that will get us started on the lab so that we can see what is r And build an array of pointers to characters count the number of words and print out each word via a pointer to the word: The 80 characters read were: A long sentence that will get us started on the lab so that we can see what is r There were 19 words and the starting letters of the words were: Alstwgusotistwcswir 8 points for the test cases (one of the test cases is worth 4 points and checks if parselnput is setting the pointers properly) 2 points comments/ headers LAB ACTIVITY T11.13.1: Lab Week 12: Character Input and Pointers 0/8 main.c Load default template... #include 2 #include 3 #include 5 #define BUFFERSIZE 81 // 80 characters plus end of string 7 int parseInput (char userInput[], char *ptrsToChars[]) 9 // your code goes in here to find the spaces and count the words and put pointers to characters after the spaces into ptrs ToChars 10 // when your function is done, ptrs ToChars[0] should have address of first character in first word in userInput 11 // and ptrsToChars[i] should have the address of the first character of word i 12 13 return 0; // this should return the number of words in userInput 14 15 16 int main (int argc, char *argv]) 17 18 char userInput [BUFFERSIZE]; // Buffer to hold user input 19 char ptrsToChars [BUFFERSIZE]; // array to hold pointers to characters in the above buffer 20 21 / read in user input here 23 call parseInput here 24 25 / write code to display results from parseInput 26 27 28 return 0

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!