Local and Global Variables in C++ | C++ में लोकल और ग्लोबल वेरिएबल्स
In C++, variables are used to store data during program execution. Based on where they are declared and where they can be accessed, variables are commonly classified as Local Variables and Global Variables . C++ में Variables का उपयोग प्रोग्राम के Execution के दौरान Data Store करने के लिए किया जाता है। इन्हें कहाँ Declare किया गया है और कहाँ Access किया जा सकता है, इसके आधार पर Variables को मुख्य रूप से Local Variables और Global Variables में वर्गीकृत किया जाता है। Local Variables in C++ | C++ में लोकल वेरिएबल्स A Local Variable is a variable declared inside a function or a block. It can be accessed only within the function or block in which it is declared, subject to its scope. Local Variable वह Variable होता है जिसे किसी Function या Block के अंदर Declare किया जाता है। इसे केवल उसी Function या Block के अंदर Access किया जा सकता है जहाँ इसे Declare किया गया है। Syntax | सिंटैक्स return_type function_name() { data_type variable_name; // Statements } Example 1: Local Variable...