Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

You are to write a program that will read up to 100 characters from stdin . It w

ID: 3615103 • Letter: Y

Question

You are to write a program that will read up to 100 characters fromstdin. It will read in the characters, one at atime until the sentinel of '$' is reached. Your program muststore those characters in an array in your program. Your first taskis to print out the array on one line to stdout.You will write a function designed to reverse the elements in theoriginal array(this must be written as a function and called as afunction). After printing out the array in its original order on asingle line, call that function to reverse the order of thecharacters in the array, then print that out on a single line belowthe first line.

Sample input from stdin:

Hannah$

The specified sample output of the program to stdout would be:

Hannah
hannaH

Explanation / Answer

please rate - thanks #include #include void reverse(char[],int); main() {char array[100]; int n=5,i; printf("Enter a string terminationg with a $: "); n=-1; do {scanf("%c",&array[++n]); }while(array[n]!='$'); printf("Before: "); for(i=0;i
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote