Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

C question

Name: Anonymous 2017-04-14 17:09

is a byte with all zeros equivalent to the integer value (signed or unsigned) zero, in terms of portability?

Such that, is memset(&i, 0, sizeof(int)); equivalent to i = 0;?

Name: Anonymous 2017-04-25 22:45

>>27
They were already teaching Pascal (or other languages) and moved to C in the late 80s and early 90s, so a better question is "How is C a better alternative to Pascal?"

If I was going to replace Pascal with something, it would be Ada, not C. I know why a lot of people use C and it is a good language for some embedded systems where safety isn't important, but it's not something I would expect universities to teach or promote as a general purpose language. In a class about kernels and operating systems, C is acceptable in my opinion (but not good), but not as the main or intro language.

That's what's so strange about this. They brought in include files, null-terminated strings, a bad preprocessor, arrays decaying to pointers, no bounds checking, switch with fallthrough, bad declaration syntax, in a new (for teaching at their university) language, and not even as a systems language, but the main general purpose language.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List