Josquius
Member
I'm at university and am learning java. I'm wondering, does this have any possible practical use for messing on with the gp or is C the only way to go?
Okay, wtf is pointer arithmetic?! :lol:If you're in university, you must learn C. Too many people are graduating without understanding basic tenets of software development, like "strings are slow" and pointer arithmetic.
I'm at university and am learning java. I'm wondering, does this have any possible practical use for messing on with the gp or is C the only way to go?
One good example is REALLY fast array transversing. Usually a lot of new programmers will use for loops to tranverse an array egOkay, wtf is pointer arithmetic?! :lol:If you're in university, you must learn C. Too many people are graduating without understanding basic tenets of software development, like "strings are slow" and pointer arithmetic.
Edit: I see, can anyone give me a real-life example of what this would be used in. Lots of this stuff I just can't see a use for when I read it.
char test_data[1000];
for ( int a = 0; a < 1000; a++)
test_data[a] = 'b';
char test_data[1000];
char *ptr = &test_data[0]; // point to the beginning of the array
for (int a = 0; a < 1000; a++)
{
*ptr = 'b';
ptr++;
}
ermm.. yes. and no.Java and C share quite a few similarities.
So your University Java Course might come in handy!