Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
int main()
{
for (int i=0; i<10000; ++i)
{
cout < DoSomething;
}
return 0;
}
int DoSomething()
{
int GotIt;
char *str;
/* allocate memory for string */
if ((str = (char *) malloc(10)) == NULL)
// Do something
return GotIt;
}
int main()
{
char str[10];
for (int i=0; i<100; ++i)
{
char c;
cin > c;
str[i] = c;
}
return 0;
}[code]
[i]str[/i] only has 10 places allocated but the loop tries to stuff it with 99 characters. These are over-simplified examples and probably won't work in real life but it should give you an idea. James P. Cottingham
[COLOR=blue]
I am the Unknown lead by the Unknowing.
I have done so much with so little
for so long that I am now qualified
to do anything with nothing.
[/color]