Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Call a Global Variable?
Index -> Programming, C -> C Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
rar




PostPosted: Wed Nov 25, 2009 6:22 pm   Post subject: Call a Global Variable?

I know it's unnecessary, but can you call a global variable as a function parameter?

Example:
code:


void Function(int);
int x;

void main()
{
Function(x);
//program
}

void Function(int y)
{
//function definition using y;
}
Sponsor
Sponsor
Sponsor
sponsor
wtd




PostPosted: Thu Nov 26, 2009 1:14 am   Post subject: RE:Call a Global Variable?

Of course you can.
Display posts from previous:   
   Index -> Programming, C -> C Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: