हेल्लो दोस्तों इस पोस्ट में हमने What is function and types of functions in Hindi के बारे में बिस्तर से बताया है साथ ही उसके types को भी अछे से समझाया गया है .तो चलिए पड़ते है
What is function In Hindi
C language में function एक प्रकार के instruction के समूह है। जिनको किसी program द्वारा बुलाया जाता है।
C language में function को दो भागों में बाँटा गया है।
1- library function (लाइब्रेरी फंक्शन)
2- user define function (यूजर डिफाइन फंक्शन)
Library function In Hindi
यह c language में प्रयुक्त्त होने वाले default function है । जिन्हें पूर्व में ही define कर दिया गया है।
Ex:- printf ( )
Scanf( )
User defined function In Hindi
फंक्शन का इस्तेमाल करके प्रोग्राम कुछ और तथा reusable बनाया जाता है। function को बनाने के लिए तथा program में उसके इस्तेमाल के लिए तीन step होते हैं
Function prototype In Hindi
यह compiler को फंक्शन के नाम , argument का प्रकार तथा उसकी return value की जानकारी प्रदान करता है।
Ex:- void sum(int x ,int y)
Definition of function In Hindi
इसके अन्दर compiler को यह सूचना दी जाती है कि उस function का कार्य क्या है।
Ex:-
# include <stdio.h>
Void (int x ,int y)
{
Int z;
Z= x+ y
Printf (z);
}
Calling of function In Hindi
function को call करने के लिए function का नाम bracket के अन्दर उसके argument तथा उस line को terminate कर दिया जाता है।
# include < stdio.h >
Void ( )
{
Int a=10; , b=20;
Sum(a, b);
}
Function को कॉल करने के दो तरीके होते हैं।
Call by value In Hindi
इस method में actual perimeter पर copy किया जाता है। तथा function फिर उसे argument के रूप में इस्तेमाल करता है।इस प्रकार की calling में variable को protect किया जा सकता है। क्योंकि function के अन्दर variable का नाम नही बदला जा सकता।(¡¡) Call by reference:-
इस method में original variable का reference बुलाया जाता है। जिससे कि call किये गये function में original value की copy नही बनती । परन्तु variable को एक अलग नाम से बुलाया जायेगा जो कि उसका reference होगा।
Call by reference method में memory का reference pointer के जरिए use किया जाता है।
What is Recursion in C with Example जाने हिंदी में…
what is structure in c language
NOTE:- आपको ये What is function and types of functions in Hindi पोस्ट कैसी लगी आप हमें कमेंट के माध्यम से अवश्य बतायें। हमें आपके कमेंट्स का बेसब्री से इन्तजार रहता है। अगर आपका कोई सवाल या कोई suggestions है तो हमें बतायें हम उसको एक या दो दिन के अंदर यहाँ प्रकाशित करेंगे और हाँ पोस्ट शेयर जरूर करें।
What is c prognamming opretar. ?????
Nice and very helpful information thanks for this type article I am big fan of your blog
thanks bro
thank you sir for shared this info please sir support me
learn c लैंग्वेज में हिंदी सीखे