In the code editor, you are provided with a main() function that asks the user for an integer and passes the address of this integer to a function call of the simple() function. This simple() function hasn't been implemented yet so your task is just that, to implement it. This has the following description: Return type - void Name - simple Parameter - address of an integer Description - prints a line of asterisks
(C
DO NOT EDIT THE MAIN FUNCTION
4. Simplicity is Beauty
by CodeChum Admin
In life, simplicity is beauty.
Let's try creating something so simple. Let's create a function that accepts the address of an integer and prints n number of asterisks out of it.
For example, if the value of the address passed is 5, then the output would be five asterisks in one line.
Instructions:
In the code editor, you are provided with a main() function that asks the user for an integer and passes the address of this integer to a function call of the simple() function.
This simple() function hasn't been implemented yet so your task is just that, to implement it. This has the following description:
Return type - void
Name - simple
Parameter - address of an integer
Description - prints a line of asterisks
DO NOT EDIT THE MAIN FUNCTION
Input
1. An integer
Output
Enter n: 5
*****
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images