Skip to main content

#Advantage of function.

                   

To define user defined function in our program file at the top of the main() function or below of the  main function.It can't be defined in the body of main function.
user defined function can be written in to a saperate file also.
syntax:-
datatype function name (argument with data type)
{
   statement;
...................
.................
.................
return(exp);
}

:- Were datatype of a function depends up on the datatype of return value by the function.
:-The rule of function name is same as the rule of variable name.
:-Argument is also called parameter.The variable name or name are declared with in the paranthesis() of a function is called arguments.

Note :- If a function doesn't return any function the data type of function is void(null datatype).
In c language it is optimal.

Comments

Post a Comment

Popular posts from this blog

Important links

  Software Drive https://drive.google.com/drive/folders/1siws7oga-10wdlPhOdcjamlDH6wm0iE_?usp=sharing PPT Drive https://drive.google.com/drive/folders/1lNHhZ4_qlsyHrWA862DyBSvkF_J4YVp8 https://docs.google.com/document/d/1fo_4gFB4sgWfTBfZvK7qf0LP0y9ge1dH/edit

Python Practice questions

Reverse  Check substring in string  Armstrong no or not Palindrome  Table print  Power of the no Factorial