What is the use of functions in C? When to use functions in C?
if same piece of code has to be executed again and again, then we can put that code in a function.
if we want to create any library, then we can create functions and convert them into libraries.
it is a tool to modularize the project it smaller chunks, so that maintenance of code will be easy.
all of the above
1. If a piece of code is repeatedly used, then we can use function in place of it to reduce the code size.
2. Even to create libraries also we can use functions.
3. Function is a tool in C to modularize a bigger task into smaller routines.
Back To Top