Functions in C Programming

Return_type Function_name(parameters)
{
Function Body
}
#include <stdio.h>void multiplyTwoNumbers(int x, int y)
{
int result = x * y;
printf("The product of %d multiplied by %d is : %d\n", x, y, result);
}
int main(void)
{
multiplyTwoNumbers(10, 20);
multiplyTwoNumbers(20, 30);
multiplyTwoNumbers(50, 2);
return 0;
}
#include <stdio.h>int myGlobalVariable = 0;    // Global Variable
int main ()
{
int myLocalVariable = 0; // Local Variable
// ***
return 0;
}

--

--

--

Full stack web developer with experience in Ruby on Rails, JavaScript, React and Redux and learning more!

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

Recommended from Medium

My Goals For HNG 8.0

Fix ModuleNotFoundError: No module named ‘ruamel’ When Importing azureml.core

Repositories and Knowledge Bases

New Fast-Track Programme for Diagnostics Manufacturers

AWS Solution Architect Associate Exam Study Notes

Spring boot with Async API call and time comparison

How to Build a Serverless Web3 Wallet Login like OpenSea with MetaMask and Cognito

Google Summer of Code Detailed Post (1/5)

Google Summer of Code

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
Danny Padron

Danny Padron

Full stack web developer with experience in Ruby on Rails, JavaScript, React and Redux and learning more!

More from Medium

Tuples in C#

Simple - Shell- in c

Function type in Typescript

C vs C++: The Important Points Of Difference You Must Know