Skip to content

C Programming, Review Questions

Anon edited this page Dec 29, 2016 · 8 revisions

1. What does the following print out

int main(){
    fprintf(stderr, "Hello ");
    fprintf(stdout, "It's a small ");
    fprintf(stderr, "World\n");
    fprintf(stdout, "place\n");
    return 0;
}

C Strings representation C Strings as pointers char p[]vs char* p Simple C string functions (strcmp, strcat,strcpy) sizeof char sizeof x vs x* Heap memory lifetime Calls to heap allocation Deferencing pointers Address-of operator Pointer arithmetic String duplication String truncation double-free error String literals Print formatting. memory out of bounds errors static memory fileio POSIX v C library C io fprintf and printf POSIX file io (read|write|open) Buffering of stdout

Clone this wiki locally