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
Some coders debug their programs by placing comment symbols on some codes instead of deleting it. How does this aid in debugging?
What are the types of functions in c?
What are the different types of constants?
why wipro wase
What is the difference between volatile and const volatile?
Explain bit masking in c?
Hai,I have done with my bachelor of commerce and planing to ms,please suggest me how to convince vo for shifting from commerce to computers. Visa on 8 DEC 2014 Npu university
Why is extern used in c?
Explain the use of #pragma exit?
When should I declare a function?
What is realloc in c?
What is the meaning of && in c?
What does %c do in c?
What does sizeof function do?
When do you not use the keyword 'return' when defining a function a) Always b) Never c) When the function returns void d) dfd