Welcome to the LearnCprogramming repository! This repository contains a collection of C programming examples and exercises for beginners and intermediate learners.
This section covers the fundamentals of C programming.
variables1.c- Working with variables.datatypes1.c- Exploring data types.gettinginputfromuser.c- How to take user input.if else statements.c- Decision making.for loop .c,while loop.c,do while.c- Loop structures.functions.c- Introduction to functions.operators.c- Arithmetic and other operators.typeconversion.c- Type conversion and casting.switchcase.c- Switch case statements.array.c- Single and multidimensional arrays.strings.c- Working with strings (character arrays).stringfunction.c- String functions (strlen,strcpy,strcat,strcmp).pointers.c- Introduction to pointers.pointersandarrays.c- Pointer arithmetic, double pointers, and pass by reference.structures.c- Grouping related data with structures.enums.c- Enumerations for named constants.recursion.c- Functions that call themselves.preprocessor.c- Preprocessor directives and macros.dynamicmemory.c- Dynamic memory allocation (malloc,calloc,realloc,free).fileio.c- Reading from and writing to files.
This section dives into more complex concepts and problem-solving.
arraysandloops.c- Advanced iterations.mpesa.c- Practical examples and simple applications.formatspecifiers.c- Working with format specifiers.triangel.c,area.c- Mathematical problems.
To compile and run any of these files, you can use a C compiler like gcc.
# Example: Compiling and running hello.c
gcc "C for Intermediate/hello.c" -o hello
./hello