Back to CV or Home
There are many 'dialects' of C. Common C, Bell Labs C, K & R C, to mention but a few, and later the American National Standards Institute, ANSI C, took hold. This is a simple C (CONSOLE) program, which, when compiled, linked and run, will print 'Hello World' to the screen.
printf( "Hello World\n" );
The compiler will convert this text to machine code, and the linker will form it all into an executable file image.
I first started to get interested in C, as opposed to Assembler, when I realised there was a group within our company that had written the UTS emulator in C, that ran in a Unix box. And even later, about the time Microsoft Windows 3.1 was taking hold, the emulator had to take on a GUI interface, and that just could not be written in Assembler.
At about the same time we had many important meeting about using C++, or OO, to code the emulator, and spent many happy hours trying to extract, form, understand how to again re-write the emulator using the newer, modern language, but that project never proceeded, so we were left with a C emulator that used some lower components still in Assembler.
Like all coding languages, you must learn the set of 'reserved' words, like 'if ... else', 'switch ... case', etc, and the general library functions, like strlen, strcpy, strcat, etc, etc, etc. I had one friend who believed it was counter intuitive, where 'var = 2;' assigned the value 2 into the variable, while 'if( var == 2 )' was how to compare the two values ...
I can not even estimate how many lines of C code I have written, but believe it would stretch into miles, and miles ... Although I have noted changes in my 'style' over the many years, I do not think there is only one 'best' style. In any case, modern integrated development environments, IDE, enforce their own 'style' on a programmer.
Back to cv or Home