0% found this document useful (0 votes)
17 views1 page

User-Defined Functions in C

A user-defined function in C is created by the programmer to perform specific tasks, allowing for custom functionality. The syntax includes a return type, function name, optional parameters, and a function body. Examples include functions like 'void Rect()' for rectangles and 'void add()' for addition.

Uploaded by

Dipak Dumbe
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views1 page

User-Defined Functions in C

A user-defined function in C is created by the programmer to perform specific tasks, allowing for custom functionality. The syntax includes a return type, function name, optional parameters, and a function body. Examples include functions like 'void Rect()' for rectangles and 'void add()' for addition.

Uploaded by

Dipak Dumbe
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

user-defined function

A user-defined function in C is a function that is created by the programmer to perform a specific task.

user-defined functions allow the programmer to define their own functionality

Syntax:-

return_type function_name(parameters)

// function body

return_type: The type of value the function will return (e.g., int, float, char, etc.). If the function
doesn't return any value, the return type is void.

function_name: The name of the function, which is used to call it.

parameters: A list of variables that the function takes as input (optional). If the function doesn't
take any input, you can leave it empty or use void.

function body: The code block that defines what the function does.

Note…..Jo function hum banate banate hai apne man se nam dete hai usko user defined
function bolte hai….

Jaise rectangle ke liye hum void Rect()

Addition ke liye void add()

You might also like