An open API service indexing awesome lists of open source software.

https://github.com/ozgen/c-playground

A collection of C programming examples, categorized by topics for easy navigation.
https://github.com/ozgen/c-playground

c mutex pointers-in-c pthreads

Last synced: 3 months ago
JSON representation

A collection of C programming examples, categorized by topics for easy navigation.

Awesome Lists containing this project

README

        

# c-playground

A collection of C programming examples, categorized by topics for easy navigation.

## Wiki
Visit the [wiki](https://github.com/ozgen/c-playground/wiki/Some-tips-while-programming-C) for tips on programming in C.

---

## Examples

### Advanced Control Flow
- [Comma Operator](./advanced-control-flow-ex/comma_operator_ex.c)
- [Goto Statement Example 1](./advanced-control-flow-ex/goto_statement_ex.c)
- [Goto Statement Example 2](./advanced-control-flow-ex/goto_statement_ex_2.c)
- [Setjump Long Jump Example 1](./advanced-control-flow-ex/setjump_long_jump_func_ex.c)
- [Setjump Long Jump Example 2](./advanced-control-flow-ex/setjump_long_jump_func_ex_2.c)

### Advanced Data Types
- [Complex Numbers](./advanced-datatypes-ex/complex_number_ex.c)
- [Flexible Array Members](./advanced-datatypes-ex/flexible_array_mem.c)
- [Variable Length Arrays](./advanced-datatypes-ex/variable_lenght_array_ex.c)

### Advanced Functions
- [No-return Function](./advanced-functions-ex/noreturn_function_ex.c)
- [Recursion Example 1](./advanced-functions-ex/recursion_function_ex.c)
- [Recursion Example 2](./advanced-functions-ex/recursion_function_ex_2.c)
- [Recursion Example 3](./advanced-functions-ex/recursion_function_ex_3.c)
- [Recursion Example 4](./advanced-functions-ex/recursion_function_ex_4.c)
- [String Functions Example 1](./advanced-functions-ex/string_functions_ex.c)
- [String Functions Example 2](./advanced-functions-ex/string_functions_ex_2.c)
- [Variadic Function Example 1](./advanced-functions-ex/variadic_function_ex.c)
- [Variadic Function Example 2](./advanced-functions-ex/variadic_function_ex_2.c)

### Advanced Pointers
- [Double Pointer Example 1](./advanced-pointers-ex/advanced_pointers_double_pointer_ex.c)
- [Double Pointer Example 2](./advanced-pointers-ex/advanced_pointers_double_pointer_ex_2.c)
- [Double Pointer Example 3](./advanced-pointers-ex/advanced_pointers_double_pointer_ex_3.c)
- [Function Pointer Example 1](./advanced-pointers-ex/advanced_pointers_function_pointer_ex.c)
- [Function Pointer Example 2](./advanced-pointers-ex/advanced_pointers_function_pointer_ex_2.c)

### Bit Manipulation
- [Bit Manipulation](./bit-manipulations-ex/bit_manipulation_ex.c)
- [Bit Fields for Packed Data](./bit-manipulations-ex/bit_fields_packed_data_ex.c)
- [Convert Binary to Decimal](./bit-manipulations-ex/convert_binary_to_decimal.c)
- [Convert Decimal to Binary](./bit-manipulations-ex/convert_decimal_to_binary.c)
- [Setting and Reading Bits](./bit-manipulations-ex/setting_reading%20bits.c)

### Data Structures
#### Binary Tree
- [Binary Tree Implementation](./datastructure-ex/binary-tree/binary_tree.c)

#### Linked List
- [Doubly Linked List](./datastructure-ex/linklist/doubly_linklist.c)
- [Single Linked List](./datastructure-ex/linklist/single_linklist.c)
- [Single Linked List Example 2](./datastructure-ex/linklist/single_linklist_ex_2.c)

#### Queue
- [Queue Implementation](./datastructure-ex/queue/queue.c)

#### Stack
- [Stack Implementation](./datastructure-ex/stack/stack.c)

### Debugging
- [Debugging Example 1](./debugging-ex/debugging_ex.c)
- [Debugging Example 2](./debugging-ex/debugging_ex_2.c)
- [Debugging Example 3](./debugging-ex/debugging_ex_3.c)

### Dynamic Library
- [Main File](./dynamic-lib-ex/main.c)
- [String Functions](./dynamic-lib-ex/StringFunctions.c)
- [Header File](./dynamic-lib-ex/StringFunctions.h)
- [Run Commands](./dynamic-lib-ex/run-ex-commands.sh)

### Dynamic Loading
- [Dynamic Loading Example](./dynamic-loading-ex/dynamicLoading.c)

### Input/Output
- [Character I/O Functions Example 1](./input-output-ex/char_io_functions_ex.c)
- [Character I/O Functions Example 2](./input-output-ex/char_io_functions_ex_2.c)
- [Character I/O Functions Example 3](./input-output-ex/char_io_functions_ex_3.c)
- [Character I/O Functions Example 4](./input-output-ex/char_io_functions_ex_4.c)
- [Format Functions Example 1](./input-output-ex/format_functions_ex.c)
- [Format Functions Example 2](./input-output-ex/format_functions_ex_2.c)

### Macros
- [Macro Example 1](./macros-ex/macro_ex.c)
- [Macro Example 2](./macros-ex/macro_ex_2.c)
- [Macro Example 3](./macros-ex/macro_ex_3.c)
- [Macro Example 4](./macros-ex/macro_ex_4.c)
- [Macro Example 5](./macros-ex/macro_ex_5.c)
- [Preprocessor Example](./macros-ex/preprocessor_ex.c)

### Signals
- [Handling Signals Example 1](./signals-ex/handling_signal_ex.c)
- [Handling Signals Example 2 (Sigaction)](./signals-ex/handling_signal_sigaction_ex.c)
- [Signal Fork Example](./signals-ex/signal_fork_ex.c)
- [Simple Signal Example](./signals-ex/simple_signal.c)

### Threads
- [Threads Example 1](./threads-ex/thread_ex_1.c)
- [Threads Example 2](./threads-ex/thread_ex_2.c)
- [Threads Example 3](./threads-ex/thread_ex_3.c)
- [Threads Condition Variables Example](./threads-ex/threads_conds_ex.c)
- [Threads Mutex Example](./threads-ex/threads_mutex_ex.c)
- [Threads Pass Arguments Example](./threads-ex/threads_pass_args_ex.c)
- [Threads Simple Example](./threads-ex/threads_simple_ex.c)
- [Threads Stack Management Example](./threads-ex/threads_stack_mngmt_ex.c)

### Unions
- [Union Example 1](./unions-ex/union_ex.c)
- [Union Example 2](./unions-ex/union_ex_2.c)

### Networking (Sockets)
- [simple socket server Example](./networking-ex/networking_simple_socket_ex.c)
- [simple socket client Example](./networking-ex/networking_simple_socket_client_ex.c)
- [socket server Example 2](./networking-ex/server.c)
- [socket client 1 Example 2](./networking-ex/client1.c)
- [socket client 2 Example 2](./networking-ex/client2.c)