CS208 Introduction to Computer Systems Friday, 15 September 2023 --->> Hack4Impact + C questions - arrays in C - allocating - initializing - change values of an array - swapping entries - dynamically enter elements into the array - running Makefile - and what does it want? - when you can use =, when do you need strcpy etc. - comparing chars, some warning about ints typecasting? - char initialization vs. char * initialization 'M' vs. "M" - when to use pointer, when array? + Easy C (given Java knowledge) - loops - declaration and initialization of primitive types (int, char, double, float, long,...) - if-statements - basic function declaring and calling + Hard C - * vs. [] - null-terminated strings - pointers + C topics - null-terminated strings - char s[10] - char *s - ?? - command-line arguments, argc, argv - files: open, read, write, close - strings: declare, initialize, copy, concatenate, length, compare - 2D arrays + Left-over questions + Quick intro to Queues in C assignment + Integers - Base 2 (binary) 111011 - Base 8 (octal) 73 - Base 10 (decimal) 59 - Base 16 (hexadecimal) 3b - Octal: 3-bit chunks, 0 notation, %o in printf - Hexadecimal: 4-bit chunks, 0x notation, %x and %X in printf, RGB color representation + char, byte, character - ASCII - Unicode (much more next week) - od (Unix command) - hexdump (Unix command)