Question: This is what I am given: int main ( void ) { char string _ input [ 1 0 0 ] ; int i =

This is what I am given:
int main(void){
char string_input [100];
int i=0
printf (enter a string: );
gets (string_input);
printf (string: %s
, string_input);
while (string_input [i]!=\0)
printf (-->%c<--
, string_input [i]);
i++;
}
}
This is a BONUS POINT OPPORTUNITY and is strictly optional. In order to earn points it must satisfy all requirements and follow lecture
/
materials provided in class
Write a program that will read a string with maximum length of
3
0
characters. For example, East Central University Tigers
Use a single printf with proper string conversion character to print string
Use a while loop to push each character of the string input onto character stack until you reach end of string
Print contents of stack
(
string should be reversed
)
Use a while loop to pop each character off the stack and print them with
-
-
>
<
-
-
on each side of them as shown in example program until stack is empty
Print stack to show it's empty
Note: You are required to know when and how to initialize stack, check to see if full, check to see if empty and so forth.
submit all
.
c and.h files used for program as attachment to a single submission

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 Programming Questions!