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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the difference between malloc() and calloc() in c?

676


Is it better to use malloc() or calloc()?

750


How will you declare an array of three function pointers where each function receives two ints and returns a float?

887


How can I find out how much free space is available on disk?

717


What is the full form of getch?

730






What is variable and explain rules to declare variable in c?

658


What are the two forms of #include directive?

736


How can variables be characterized?

1783


What is far pointer in c?

906


Explain how do you view the path?

765


What do you mean by Recursion Function?

730


Can we replace the struct function in tree syntax with a union?

890


What is #include called?

670


What does it mean when a pointer is used in an if statement?

704


What is the difference between abs() and fabs() functions?

716