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
Write a function expand(s1,s2) that expands shorthand notations like a-z in the string s1 into the equivalent complete list abc...xyz in s2 . Allow for letters of either case and digits, and be prepared to handle cases like a-b-c and a-z0-9 and -a-z. z-a:zyx......ba -1-6-:-123456- 1-9-1:123456789987654321 a-R-L:a-R...L a-b-c:abbc
Where register variables are stored in c?
What are high level languages like C and FORTRAN also known as?
Between macros and functions,which is better to use and why?
Can an array be an Ivalue?
How #define works?
explain what is a newline escape sequence?
What is the easiest sorting method to use?
Explain what are reserved words?
What is the difference between fread and fwrite function?
where are auto variables stored? What are the characteristics of an auto variable?
What is the difference between memcpy and memmove?
How can I invoke another program (a standalone executable, or an operating system command) from within a c program?
write a program that will open the file, count the number of occurences of each word in the the complete works of shakespeare. You will then tabulate this information in another file.
Explain how can I make sure that my program is the only one accessing a file?