Computer Science, asked by rishunarang34, 8 months ago

how many main function can be use in the C language program​

Answers

Answered by TheKinnG
7

Explanation:

In this tutorial, we will learn functions in C programming. A function is a block of statements that performs a specific task. Let’s say you are writing a C program and you need to perform a same task in that program more than once. In such case you have two options:

a) Use the same set of statements every time you want to perform the task

b) Create a function to perform that task, and just call it every time you need to perform that task.

Using option (b) is a good practice and a good programmer always uses functions while writing code in C.

Why we need functions in C

Functions are used because of following reasons –

a) To improve the readability of code.

b) Improves the reusability of the code, same function can be used in any program rather than writing the same code from scratch.

c) Debugging of the code would be easier if you use functions, as errors are easy to be traced.

d) Reduces the size of the code, duplicate set of statements are replaced by function calls.

Answered by rakwalgourav9
1

Answer:

How many main functions can be used in a C program

Similar questions