Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Can you think of a way when a program crashed before
reaching main? If yes how?

Answers were Sorted based on User's Feedback



Can you think of a way when a program crashed before reaching main? If yes how?..

Answer / sunil

The global variables get initialized by the c startup
functions before the main function is being called.
Hence any error in global variables will cause a crash
before reaching the main.

Is This Answer Correct ?    5 Yes 0 No

Can you think of a way when a program crashed before reaching main? If yes how?..

Answer / pyari

int foo ()
{
// It comes here before main is invoked
//Hence a crash happening in this function
obviously ,will happen before main is called


// s simple crash :)
swprintf(NULL,L"%s",L"crash");
return 1;

}

int i = foo ();

int _tmain(int argc, _TCHAR* argv[])
{
return ( 0 );
}

Is This Answer Correct ?    2 Yes 1 No

Post New Answer

More C Interview Questions

What is the package for freshers(Non IIT) in amazon(hyderabad). And what is the same for those who are a contract employee.

0 Answers  


What is an expression?

0 Answers  


write c program without semicolon

11 Answers   MindTech, TCS, Wipro,


Write a program to print the prime numbers from 1 to 100?

7 Answers  


write a program to swap two numbers without using temporary variable?

3 Answers  


without using control structures and control structures find the max and min of given 2 nos

1 Answers   HCL,


What is wrong with this initialization?

0 Answers  


What is meant by 'bit masking'?

0 Answers  


Describe dynamic data structure in c programming language?

0 Answers  


Write a program to exchange two variaables without temp

9 Answers   Geometric Software,


What is structure in c explain with example?

0 Answers  


What is #line in c?

0 Answers  


Categories