Skip to content

Commit d6047cc

Browse files
Update README.md
1 parent 725e756 commit d6047cc

File tree

1 file changed

+15
-22
lines changed

1 file changed

+15
-22
lines changed

README.md

Lines changed: 15 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -404,13 +404,12 @@ As you can see here, it's just printing "Hello World" ten times, whether it's
404404
a `for` loop, `while` loop, or `do-while` loop.
405405

406406
## Functions
407-
A function is a group of statements (commands)
408-
that together perform a task.
409-
There are built-in functions and functions that a
410-
programmer will create according to his/her needs.
407+
A function is a group of statements (commands) that together perform a task.
408+
There are built-in functions and functions that a programmer will create
409+
according to his/her needs.
411410

412411
### Sample Program Creating And Using Functions
413-
```
412+
```c
414413
#include <stdio.h>
415414

416415
void myFunction() {
@@ -420,31 +419,25 @@ void myFunction() {
420419
}
421420

422421
int main() {
423-
424422
myFunction();
425-
426423
return 0;
427424
}
428425
```
429426

430-
The function `printFunctionTest()` is created by
431-
declaring `void` first. Other functions will return values
432-
but for the sake of simplicity we create a void `function`.
433-
A `void` function will simply execute the commands
434-
contained in it, nothing else.
427+
The function `myFunction()` is created by declaring `void` first. Other
428+
functions will return values, but for simplicity, we create a void function.
429+
A `void` function will simply execute the commands contained in it, nothing
430+
else.
435431

436-
Then inside the main function, you simply invoke it
437-
by its name. And all the commands inside that function
438-
will be executed line by line.
432+
Then inside the main function, you simply invoke it by its name. All the
433+
commands inside that function will be executed line by line.
439434

440-
Why use functions? Imagine if there is none. Complex
441-
programs are usually composed of thousands of lines of code
442-
up to million, without any grouping, that will be
443-
very hard to handle.
435+
Why use functions? Imagine if there were none. Complex programs are usually
436+
composed of thousands to millions of lines of code. Without any grouping,
437+
that would be very hard to handle.
444438

445-
If a function is generic and can be used for other
446-
projects, you can simply separate it for distribution.
447-
So your code is now reusable.
439+
If a function is generic and can be used for other projects, you can simply
440+
separate it for distribution. So your code is now reusable.
448441

449442
## More Of My Content
450443
- [jdevfullstack Profile](https://github.com/jdevfullstack)

0 commit comments

Comments
 (0)