What do mean by user deffine function | SoloLearn: Learn to code for FREE!

+4

What do mean by user deffine function

c

5/17/2020 3:35:12 PM

Ashwini Kumar

4 Answers

New Answer

+2

Some functions are defined by the user for performing specific tasks. They are known as user defined functions. For eg., If you want to multiply all the factors of a number, you create a function which will perform the task when a number is passed to it when called in the main function and it returns the product.

+3

The function which you write for your own purpose (any thing you do in that function) are user-defined functions like Ex1 : void myfunction(int I) { printf("%d",I); } Ex2: char* myfunc() { char a[20]="hello"; return a; } And predefined functions are like printf() , scanf() , gets() , abs() , pow(), fscanf(), strlen(), etc... I hope u understand this..

+1

You are an user. Now if you write a function, that is what called 'User defined function' :))

0

The function that you write it, and not the functions defined previously with the language.