ابدأ بالتواصل مع الأشخاص وتبادل معارفك المهنية

أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.

متابعة

What are global variables? How are they declared? What are the problems with using globals?

user-image
تم إضافة السؤال من قبل Rizwan Shah , Project Manager , COMSATS IIT
تاريخ النشر: 2014/09/30
Mahesh Talluri
من قبل Mahesh Talluri

Global variables are the variables which are declared outside the main function in c++.

Local variable are the variables which are declared within method().These variables can be accessed within which they are declared

Global variables can be accessed anywhere within the program.

Local variables which are declared with the same name as Global variables hides the Global variables.

Therefore wastage of memory.

المزيد من الأسئلة المماثلة

هل تحتاج لمساعدة في كتابة سيرة ذاتية تحتوي على الكلمات الدلالية التي يبحث عنها أصحاب العمل؟