aravind


{ City } kalpetta
< Country > india
* Profession *
User No # 29817
Total Questions Posted # 1
Total Answers Posted # 2

Total Answers Posted for My Questions # 2
Total Views for My Questions # 4842

Users Marked my Answers as Correct # 1
Users Marked my Answers as Wrong # 2
Questions / { aravind }
Questions Answers Category Views Company eMail

given the code segment below void main() { cout<<"my no. is"; } question is how can we get the output hai aravind my no. is 99999999999 without editig the main().

2 C++ General 4842




Answers / { aravind }

Question { IBM, 9880 }

Should you protect the global data in threads? Why or why
not?


Answer

Global data need to be stored in a common place where each
thread can access it within that program. So it shouldnot
be stored on a particular thread but in the process's
memory where each thread can access it.

Is This Answer Correct ?    1 Yes 1 No

Question { 8119 }

What will happen when the following code is run:
int x;
while(x<100)
{
cout< x++;
}




1) The computer will output "0123...99"


2) The computer will output "0123...100"


3) The output is undefined


Answer

In most of the compilers now all declared variables are
usually initialised with 0. So in most compilers result
would be #1. But in some cases the garbage values may creep
up.

Is This Answer Correct ?    0 Yes 1 No