What is Function in C

In this tutorial, we will study what is function in c programming languages and the types of function (pre-defined functions and user-defined functions), and the syntax of the function. So let’s start.

What is Function in C?

In order to solve a problem of C language, it should solve all those parts of the weights in small parts and add all the parts at the end and these small types of different types related to a problem are called functions. By using Functions, saving both the programmer’s time and the computer’s memory. With the help of Function, we can use the same code again and again.

Types of Function

The function are two types

  • Pre-defined functions
  • User-defined functions

Pre-defined Functions

The functions that we already get to use directly For example: — prinf (); clrscr (); getch (); etc. All these functions are already received by us, to use them, you have to include this header file in your source program.

When using any predefined functions in your source program, this process is called the calling function. Pre-define functions are also called built-in functions.

User-defined Functions

The functions that the programmer develops on the basis of their need are called user define function if the program can do all the work without creating a user-defined function But creating the function reduces the comparability of the program. Creating functions makes it easy to debug the program. The programmer creates the user define function according to the way it is created.

Function Declaration

<return-type> <function-name>(<list-of-parameters>);

Function syntax

<return-type> <function-name>(<list-of-parameters>)
statement 1;
statement 2;
statement n;

Function Call


Learn into deep — What is function in c programming

Originally posted on alimammiya.hashnode.dev




Use My Notes is an Education Website for providing all Technical course material. https://usemynotes.com/

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Dependency Resolving Mastery in ASP.NET Core Apps

How to use CouchDB as Cache Database in your app (2/3)

Critical Making Over a Semester

“Hello World”

AWS Lambda — Debugging File Descriptor Exhaustion Using Go

Recursion Simplified

How to start at C++?

Build An Image Classifier For Detecting Viral Pneumonia, Bacterial Pneumonia With Azure AI And…

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Use My Notes

Use My Notes

Use My Notes is an Education Website for providing all Technical course material. https://usemynotes.com/

More from Medium

What Do I See in These Languages

Thoughts on Declarative vs Functional Programming and QML/Javascript

Introduction to C Programming

Real-time H-265 video stream encoding with c++ and libavcodec