Define global variable in c++ program, C/C++ Programming

Define global variable in c++ program:

How to define a global variable and need of global variable in c++ program.

int main()

{

   int m=20;

   clrscr();

   for( int i=0;i<4;i++)

   {

     m=60;

     cout << m;

     cout<<"the global variable is\n"<

   }

     getch();

return m;

}

Posted Date: 10/19/2012 2:58:16 AM | Location : United States







Related Discussions:- Define global variable in c++ program, Assignment Help, Ask Question on Define global variable in c++ program, Get Answer, Expert's Help, Define global variable in c++ program Discussions

Write discussion on Define global variable in c++ program
Your posts are moderated
Related Questions
Binomial coefficients are the numeric factors of the products in a power of a binomial such as (x + y)n. For example, (x + y)2 = x2 + 2 x y + y2 has the coefficients 1 2 1. Binomia


Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve between two points can b

How are postfix and prefix versions of operator++ () differentiated? A: The postfix version of operator++ () contain a dummy parameter of type int. The prefix version does not c

write a c program to find the area under the curve4 f=(x) between x=a and x=l integrate y=(x) between the limits of a and b Solution: #include float    start_point,

Introduction:  This assignment requires a knowledge of variables (integers, char types), loops, conditionals, switch, functions, char arrays, string arrays, number arrays, struc


wap to calculatethe volume of cone,cylinderand sphere


develop an algorithm using pseudocode for computing cos(x) and sin(x). use a sentinel controlled while loop. use the series definition of e^+-jx