Answered step by step
Verified Expert Solution
Question
1 Approved Answer
C program 2. Create a library. The library should contain two functions, Hello and World). Calling the Hello) function should print out the string Hello;
C program
2. Create a library. The library should contain two functions, Hello and World). Calling the Hello) function should print out the string "Hello"; calling the World() function should print out the string "World." The library should use a flag (implemented using a static global variable) that keeps track of which string was last printed. A call to the Hello function should print out 'Fello only if World was the last string printed, and vice versa. The flag should be updated at the end of each function call. Each function should return 1 if the string was printed, 0 otherwise. Write a simple program that uses the library and tests for the correct working of the functionsStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started