calling function
|
Go4Expert Member
|
|
| 31Aug2007,23:48 | #1 |
|
can a function be called without calling main( ) function??? please calrify me.. if so plz explain it in detail.
|
|
Team Leader
|
![]() |
| 1Sep2007,00:18 | #2 |
|
No. Main is called by the executive that launches the program. One should never call main explicitly. The effects of doing so result in undefined operation.
|
|
Go4Expert Founder
|
![]() |
| 1Sep2007,12:09 | #3 |
|
Quote:
Originally Posted by buddy Code:
#include<iostream>
using namespace std;
int func()
{
cout<<"In Func"<<endl;
return 10;
}
static int i = func();
int main()
{
cout<<"In Main"<<endl;
return 0;
}
|


