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
What are the uses of a pointer?
how can f be used for both float and double arguments in printf? Are not they different types?
Why is python slower than c?
What is static memory allocation? Explain
How are variables declared in c?
Is register a keyword in c?
What is a global variable in c?
What are the different types of C instructions?
Why string is used in c?
Explain what would happen to x in this expression: x += 15; (assuming the value of x is 5)
#include main() { int *p, *c, i; i = 5; p = (int*) (malloc(sizeof(i))); printf(" %d",*p); *p = 10; printf(" %d %d",i,*p); c = (int*) calloc(2); printf(" %d ",*c); }
What does the function toupper() do?
What is the right type to use for boolean values in c?
Is void a keyword in c?
Define and explain about ! Operator?