i got that part. actually later. but what i was saying that usually i get a error when i try to access an element of the array that does not exist that way. so i didn't go into the logic too much. i...
Type: Posts; User: graydot
i got that part. actually later. but what i was saying that usually i get a error when i try to access an element of the array that does not exist that way. so i didn't go into the logic too much. i...
and yes, it should segfault.
hey. thanks a lot. that is more understandable. I didn't know realloc did that.
ah. that explains it. thanks a lot.
printf("Square root of 100 is equals to: %d", sqrt(x));
gives output as 0, however
printf("Square root of 100 is equals to: %d", (int)sqrt(x));
gives the correct output of 10.
I wonder why the...
Theoren, you code actually works perfectly fine on my gcc compiler. I can find the file test created. I am using Netbeans on Ubuntu Hardy Heron.