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 |
GIven a sequence of characters. How will you convert the lower case characters to upper case characters. ( Try using bit vector - sol given in the C lib -> typec.h)
How does memset() work in C?
What is memory leak in c?
please help me.. how to write a code of this output?? "Enter range number:"10 1 is an odd number 2 is an even numbers 3 in an odd numbers 4 " to 10" "printing all odd numbers:" 1,3,5,7,9 "printing all even numbers:" 2,4,6,8,10 "sum of all odd numbers:25 "sum of all even numbers:30 using a C Programming ARRAY pleas pleas help.. its my project ..please :(
what is difference between ANSI structure and C99 Structure?
What are the general description for loop statement and available loop types in c?
plz answer..... a program that reads non-negative integer and computes and prints its factorial
using for loop sum 2 number of any 4 digit number in c language
What is the difference b/w Structure & Class?
the data type used for unlimited value in c and how to do this program
How would you find a cycle in a linked list?
Write an efficient algo and C code to shuffle a pack of cards.. this one was a feedback process until we came up with one with no extra storage.