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
*****
![asterisks
main.c
>
+ c
3. DO NOT EDIT THE MAIN
FUNCTION
1 #include<stdio.h>
3 - int main(void) {
int n;
Input
1. An integer
printf("Enter n: ");
scanf("%d", &n);
7
8
9.
simple(&n);
Output
10
11
return 0;
12 }
Enter n: 5
*****](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fd46b6080-59ac-43dd-a083-17cb326bb723%2F2ba9ce10-a55f-43e7-a048-d1e286221ce7%2Ftxhju5_processed.jpeg&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)