consider the program
int a = 10;
int main()
{
int a = 20;
}
now i need to acess the global a within main so how to do it.
but i have solution like this
int main()
{
int i = a;
int a = 20;
}
but is there any alternative.
User Profile
Collapse
-
accessing global variables in c
-
strlen for char arrays
hi
char a[2][4] = {"one", "two"};
for the above "a" can i use strlen and if so how if not then how to find strlen of "a". -
hi iam new to this forum so i will post a proper one ...... -
thanks for ur reply i tried this will raise to compiler error informing ambiguity....Leave a comment:
-
overloaded function question
consider overloaded functions
//function 1
void hi(int a)
{
}
//function 2
void hi(int a, int b = 20)
{
}
int main()
{
hi(10);
}
which function will it be invoked and y. -
-
Can You call a Class Destructor Explicitly
hi,
is there any situation that we can call descructor.
No activity results to display
Show More
Leave a comment: