Program 57 #P57 - C Program to add two number's using a UserDefined Function #C176

Subscribers:
10,700
Published on ● Video Link: https://www.youtube.com/watch?v=Vn0Q3G-eZkk



Duration: 2:00
167 views
11


Syntax of function prototype
returnType functionName(type1 argument1, type2 argument2,...);
In the above example, int addNumbers(int a, int b); is the function prototype which provides following information to the compiler:

name of the function is addNumbers()
return type of the function is int
two arguments of type int are passed to the function
The function prototype is not needed if the user-defined function is defined before the main() function.
Passing arguments to a function
In programming, argument refers to the variable passed to the function. In the above example, two variables n1 and n2 are passed during function call.

The parameters a and b accepts the passed arguments in the function definition. These arguments are called formal parameters of the function.
The type of arguments passed to a function and the formal parameters must match, otherwise the compiler throws error.

If n1 is of char type, a also should be of char type. If n2 is of float type, variable b also should be of float type.

A function can also be called without passing an argument.

Return Statement
The return statement terminates the execution of a function and returns a value to the calling function. The program control is transferred to the calling function after return statement.

In the above example, the value of variable result is returned to the variable sum in the main() function.
Syntax of return statement
return (expression);
For example,

return a;
return (a+b);
The type of value returned from the function and the return type specified in function prototype and function definition must match.

#rubalsolutions #coding #developer #programming #programmer #technology #clanguage #computerscience #c #informaticpractices #sub #subscribe #youtube #newyoutuber #youtubechannel
To Install Turbo C++ 4.5 Click on Below Link and Download rar file and extract and then install..
https://app.box.com/s/soz2137zo0rv0sb...
Do Like,Comment,Share and Subscribe if u are learning little bit.
Please give me suggestions in form of comment box .

Link To My Blog - https://www.blogger.com/blogger.g?blo...
Like me on Facebook @ https://www.facebook.com/rubalsolutions/
Follow me on Twitter @ https://twitter.com/ruby0071
Follow me on Instagram @https://www.instagram.com/er.rubal/
Email me at :- ruby0071@gmail.com




Other Videos By Rubal Solutions


2019-03-20Holi Ki Ram Ram. होलिका दहन ।। होली की शुभकामनाये सबको ।। अपनी अपनी blessings देते रहना channel ko .
2019-03-20Program 61 #P61 - C Program Prime Number Program with Argument passed and a return value #C180
2019-03-20Program 60 #P60 - C Program Prime Number Program Argument passed but no return value #C179
2019-03-20Program 59 #P59 - C Program PPrime Number Program with No arguments passed but a return value #C178
2019-03-20होलिका दहन की कहानी - मुदित को जो समझ आया उसने अपने शब्दों में दाल दिए ।। thank u betuuuuu 😇😇🌟🌟
2019-03-19आज की कथा - गणेशजी (विनायक जी की कहानी ) #कथा06
2019-03-19Beautiful Stone Art By Artist ... Stone Art is awesome ...
2019-03-19A Story Worth Sharing - Busy But Be-Easy हर पल को खुश होकर जियो || सदा स्वस्थ रहो ||
2019-03-18Program 58 #P58 - C Program Prime No By User Defined Function No arguments and no return Value #C177
2019-03-16Some important Common Full Forms To Be Known for Various Competitive Exams.
2019-03-16Program 57 #P57 - C Program to add two number's using a UserDefined Function #C176
2019-03-15Theory - Learning C Programming ||Some Imp Points About Functions In C. || For Beginners || #C175
2019-03-15Program 56 #P56 - C Program for FUNCTION finding MAX number of two #C174
2019-03-14Theory - Learning C Programming || C Programming C Programming Functions02 || For Beginners || #C173
2019-03-13Learning C Programming || C Programming C Programming Functions || For Beginners || #C172
2019-03-11Program 55 #P55 - C Program to Print Inverted Full Pyramid using Asterisk '*' #C171
2019-03-11Program 54 #P54 - C Program to Print Full Pyramid using Asterisk '*' #C170
2019-03-10Program 53 #P53 - C Program to print Inverted half pyramid using numbers #C169
2019-03-10Program 52 #P52 - C Program to print half pyramid using alphabets #C168
2019-03-10Program 51 #P51 - C Programs to print inverted half pyramid using star #C167
2019-03-06Program 50 #P50 - C Program to print half pyramid a using numbers #C166



Tags:
computer education
computer education in Hindi
basic computer training
rubalsolutions
beginner YouTube
coding
developer
newyoutuber
subscribe
sub
computer-science
c program