|
Write a program crashed before reaching main? If happen, how?
Question: Write a program crashed before reaching main? If happen, how?
Question:Write a program crashed before reaching main? If happen, how?
AnswerIn C,Using startup functions global variables are initialized before execution of main function.When any errors come in global memories than It can crashed before reaching the main.
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);
}
By:Vivek Kr. Agarwal Date:
Write a program crashed before reaching main? If happen, how?
Post Your Answers
Related Links
- Write a program for 1 232 34543 4567654?
- What does exit() do?
- What is the difference between memcpy and strcpy?
- How can we handle exceptions in C?
- How to compare two strings without using the strcmp() function?
- How to access or modify the constt variable in C ?
- What is an volatile variable?
- How the processor registers can be used in C?
- IF **p and &(*p) are same, than tell how?
- Can you write function similar to printf()?
- How to use functions fseek(), freed(), fwrite() and ftell()?
- What do you understand about datatype?
- What are the data type modifiers?
- what are the constants?Explain in brief?
- How to differentiate b/n definition and declaration?
- How to define their types of variables and initialize them?
- What is type casting?Explain it with an example?
- What are the Array?How to define and declare them?
- What are the Array Indexing?explain.
- What do you understand about String?Explain it.
- What are the reserved Keywords?Explain it.
- What are the ANSI reserved names in C?
- What are the pointers?How to declare them?
- What are the Indirection?Explain with an example?
- What are the Function Pointer?Explain with an example?
- What are the Bit Operators?
- What are the External Variables?
- How to define structure in C?
- How do u understand about structures of arrays?
- How do you define offsetof() Macro?
- What the use of malloc() function?
- What are the different types of malloc() function in C?
- What is the use of calloc() function?
- What are the different type of calloc() function?
- How to use free() function?
- How to differentiate local memory and global memory?
- What is the significance of disk files?
- What are the Text Files and Binary Files?
- What are the temporary disk files?How to create them?
- What are the stream files?
- What are the stdin and stdout file?
- What is the stdaux file?
- What do you understand about Direct port I/O?
- What is the data management?Also define Sorting, merging and purging, Indexed files?
- What are the Linked List?
- What is the Double LinkedList?
- What is the difference b/n Linear search and Binary search?
- What do you understand about B-Tree?
- What is Thrashing?
- What is a pragma?
Question:Write a program crashed before reaching main? If happen, how?
|
New Updates
|
|
|
|
|
Topics
|
|
|
|
|
Topics
|
|
|
|
|
|
|