Язык программирования С.
Программирование. Алгоритмы. Структуры данных.
C language. Basics.
- C Language intro. Why learn C.
- Language overview. History. C Language standards.
- Environment setup. Windows. Linux.
- Program structure.
- Basic syntax.
- Data types.
- Variables and keywords.
- Constants.
- Operators.
- Flow control. Decision making.
- Loops.
- Functions.
- Scope rules.
- Arrays.
- Pointers.
- Strings.
- Structures.
- Unions.
- Bit fields
- Typedef.
- Input & Output.
- File I/O.
- Preprocessor directives.
- Header files.
- Type casting.
- Error handling.
- Recursion.
- Memory management.
- Command line arguments.
C language. Advanced.
- Compiling steps.
- Macros and preprocessor.
- Line slicing.
- Tokens.
Declaration. Definition. Scope.
- How are variables scoped. Scope rules.
- How linker resolve multiply defined global symbols.
- Complicated declarations in C. Redeclaration.
- Internal and external Linkage.
- Initialization of global and static variables.
Data types
- Data types.
- Use of bool.
- Integer promotions.
- Comparison of a float variables.
- Long data type
- size_t data type.
- Data-types and modifiers.
- Float and Double.
- Typecasting.
Storage classes
- Storage classes.
- Static variables.
- “extern” keyword.
- Default values of static variables.
- “volatile” qualifier.
- Const qualifier.
- Initialization of static variables.
- “register” keyword.
Input/Output
- Returned values of printf(), scanf()
- Return type of getchar(), fgetc() and getc().
- puts() vs printf()
- Difference between printf, sprintf and fprintf.
- Difference between getc(), getchar(), getch() and getche().
- Difference between %d and %i format specifier.
- scanf() and fscanf().
- getchar_unlocked().
- Problem with scanf()
- rand() and srand()
Operators
- Operators in C. Arithmetic operators
- Relational and logical operators.
- Bitwise operators.
- Operator precedence and associativity.
- Evaluation order of operands.
- Sequence points.
- sizeof operator .
- Operands for sizeof operator.
- Result of comma operator as l-value in C.
- Order of operands for logical operators.
- Precedence of postfix ++ and prefix ++ in C.
- Ternary operator.
- Difference between ++*p, *p++ and *++p
- Difference between strlen() and sizeof()
- Stringizing and Token-pasting operator
Preprocessor
- Macros.
- Variable length arguments for macros
- Multiline macros.
- CRASH() macro – interpretation
- The OFFSETOF() macro.
- Branch prediction macros in GCC
- Diffference between #define and const in C?
- Constants in C
- Preprocessor directives. Advanced.
- isgraph() library function
- Create your own header file.
- difftime() library function
- tmpnam() library function
- _Generic keyword.
- math.h library functions
- typedef versus #define in C
- strftime() library function
- exec family of functions
Arrays & Strings
- Arrays in C Language
- Strings in C Language
- Escape sequences in C
- Properties of array in C language
- Do not use sizeof for array parameters
- Initialization of variable sized array.
- Single quoted vs double quoted declaration of char array.
- Multidimensional arrays in C.
- char s[] vs char *s .
- Storage for strings.
- Array and pointer.
- How to dynamically allocate a 2D array.
- How to pass a 2D array as a parameter.
- Short hand array notation
- Accessing array out of bounds
- strcpy(), strcmp(), strdup(), strdndup().
- strpbrk(), strcull(), ispunct(), strspn()
- isalpha() and isdigit().
Control statements
- For vs While
- Nested loops.
- switch statement
- while(1), while(0)
- goto statement
- Continue statement
- Break statement
- Using range in switch case
Functions
- Function prototype.
- return vs exit()
- How to count variable number of aguments.
- Evaluation order of function parameters.
- Return multiple values from a function.
- Static functions
- exit(), abort() and assert()
- _Noreturn function specifier.
- __func__ identifier.
- Callback function.
- Parameter passing techniques
Pointers
- Double Pointer (Pointer to Pointer).
- Why C treats array parameters as pointers.
- Dangling, Void , Null and Wild pointers
- Pointer to a function.
- Pointer vs Array
- near, far and huge pointers
- const char *p, char * const p and const char * const p
- Pointer to an Array
Enum, Struct and Union
- Structure member alignment.
- Operations on struct variables
- Bit fields.
- Flexible array members in structure.
- Structure vs Union
- Anonymous Union and Structure
- Compound literals
Memory Management
- Memory layout of C programs,
- How to deallocate memory without using free()
- calloc() vs malloc()
- Use of realloc()
- What is memory leak? How can we avoid?
File handling
- Basics of file handling
- fseek() vs rewind()
- EOF, getc() and feof()
- fopen() for an existing file in write mode
- fgets() and gets().
- fsetpos().
- tmpfile() function./li>
- fgetc() and fputc().
- fseek().
- ftell().
- lseek().
Data structures
- Array
- Linked list
- Stack
- Queue
- Binary tree
- Binary search tree
- Heap
- Hashing
- Graph
- Matrix
Algorithms
- Search algorithms - linear search and binary search
- Comparison of sorting algorithms
- Intro to sorting algorithms: bubble sort
- Selection sort and insertion sort
- Heap sort
- Merge sort
- Quicksort
- Radix sort a special case sorting algorithm