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

. Write a program to get a string and to convert the 1st letter of it to uppercase

2 Answers   HTC,


When should the const modifier be used?

0 Answers  


What is character constants?

0 Answers  


What is structure packing in c?

0 Answers  


how to introdu5ce my self in serco

0 Answers  


State two uses of pointers in C?

0 Answers   Aspire, Infogain,


Why shouldn’t I start variable names with underscores?

0 Answers  


typedef struct{ char *; nodeptr next; } * nodeptr ; What does nodeptr stand for?

0 Answers   Wilco,


how many argument we can pas in in a function

25 Answers   CTS,


Differentiate call by value and call by reference?

0 Answers   Cyient,


what are threads ? why they are called light weight processes ? what is the relation between process and threads ?

1 Answers  


a way in which a pointer stores the address of a pointer which stores the value of the target value a) reference b) allocation c) multiple indirection d) none

0 Answers  


Categories