Can you think of a way when a program crashed before
reaching main? If yes how?
Answers were Sorted based on User's Feedback
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 |
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 |
. Write a program to get a string and to convert the 1st letter of it to uppercase
When should the const modifier be used?
What is character constants?
What is structure packing in c?
how to introdu5ce my self in serco
State two uses of pointers in C?
Why shouldn’t I start variable names with underscores?
typedef struct{ char *; nodeptr next; } * nodeptr ; What does nodeptr stand for?
how many argument we can pas in in a function
Differentiate call by value and call by reference?
what are threads ? why they are called light weight processes ? what is the relation between process and threads ?
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