Posts

Showing posts with the label function prototype

Function Declaration, Function Definition and Function Call in C++ - उदाहरण सहित

In C++, a user-defined function generally involves three important steps: Function Declaration (Prototype), Function Definition, and Function Call . These steps help the compiler understand the function and allow the program to execute the required task. C++ में User-Defined Function का उपयोग करने के लिए सामान्यतः तीन महत्वपूर्ण चरण होते हैं: Function Declaration (Prototype), Function Definition और Function Call । ये चरण Compiler को Function की जानकारी देते हैं और प्रोग्राम में आवश्यक कार्य को Execute करने में सहायता करते हैं। 1. Function Declaration or Prototype – फंक्शन डिक्लेरेशन या प्रोटोटाइप A function declaration informs the compiler about the function name, return type, and parameter types before the function is used. It is also called a Function Prototype . Function Declaration Compiler को Function के नाम, Return Type और Parameters के Data Types की जानकारी देता है। इसे Function Prototype भी कहा जाता है। Syntax: return_type function_name(parameter_list); Example: int addition(i...