This repository contains C programming programs that I worked on during my B.Tech Semester 1 – C Programming Lab.
You can find the complete notes, slides, and study resources related to this subject here:
🔗 Semester 1 – Learning Programming Concepts with C
- 🧠 Beginner-friendly C programs
- 🧩 Covers core programming concepts
- 📝 Well-structured and commented code
- I have also included the compiled
.exeoutput files so you can directly run them and view the program output. - To run a program:
- Either double-click the
.exefile, or - Open the folder in Command Prompt and type:
output-file-name.exe - Press Enter to see the output.
- Either double-click the
- 🎓 Useful for students, lab practice, and revision
--> C is a general-purpose programming language.
--> It is Procedural Programming language.
--> It has been used to develop operating systems, databases and applications.
--> It is Middle Level Programming language and gives more control to Programmer.
--> GCC stands for GNU C/C++ Compiler.
--> To begin with GCC, visit the official website

--> Download GCC according to the platform being used like Linux, MacOs or Windows.
--> Follow the setup wizard.
--> Write c code in any text editor or IDE and save it with .c extention.
--> Then just open the console and run this command -
gcc filename.c -o Output
--> Filename is the name of the C script file and Output is the name of the output file.
--> After this command is executed, if the code is successfully compiled output file will be saved in the same location as the code file.
--> Once this Output file is executed in command prompt, the output will be displayed.
Learning-Programming-Concepts-With-C/
│
├── Alphabet-Pattern/ # 🔤 Alphabet pattern programs
│ └── Alphabet-Pattern-EDCBA-Inverse-space-3.c
│
├── Basic-Programs/ # 🧩 Basic C programs with comments
│ └── (Multiple basic C programs)
│
├── Loops/ # 🔁 Programs based on loops
│ └── (for, while, do-while programs)
│
├── Number-Pattern/ # 🔢 Number pattern programs
│ └── (Various number pattern programs)
│
├── Recursion/ # ♻️ Recursive function programs
│ └── Largest-array-recursion.c
│
├── Star-Pattern/ # ⭐ Star pattern programs
│ └── (Different star pattern programs)
│
├── String-functions-library/ # 📚 Inbuilt string function programs
│ └── (Programs using standard string library functions)
│
├── User-Defined_string-Function/ # 🛠️ Custom string function implementations
│ └── (User-defined string functions)
│
├── Output-Executables/ # ⚙️ Compiled .exe output files
│ └── (*.exe files for direct execution)
│
├── LICENSE # 📜 License file
│
└── README.md # 📄 Project documentationPrimitive data types are the most basic data types that are used for representing simple values such as integers, float, characters, etc.
--> The integer datatype in C is used to store the whole numbers without decimal values.
--> Octal values, hexadecimal values, and decimal values can be stored in int data type in C.
- Range: -2,147,483,648 to 2,147,483,647
- Size: 4 bytes
- Format Specifier: %d
--> Float in C is used to store decimal and exponential values.
--> It is used to store decimal numbers (numbers with floating point values) with single precision.
- Range: 1.2E-38 to 3.4E+38
- Size: 4 bytes
- Format Specifier: %f
--> The size of the character is 1 byte. It is the most basic data type in C.
--> It stores a single character and requires a single byte of memory in almost all compilers.
- Range: (-128 to 127) or (0 to 255)
- Size: 1 byte
- Format Specifier: %c
--> It does not provide a result value to its caller.
--> It has no values and no operations.
--> It is used to represent nothing. Void is used in multiple ways as function return type, function arguments as void, and pointers to void.
--> In computer programming, an enumerated type (also called enumeration) is a data type consisting of a set of named values called elements, members, enumeral, or enumerators of the type.
--> The enumerator names are usually identifiers that behave as constants in the language.
--> Enumeration (or enum) is a user defined data type in C. It is mainly used to assign names to integral constants, the names make a program easy to read and maintain.
--> The keyword ‘enum’ is used to declare new enumeration types in C.
The data-types that are derived from the primitive or built-in datatypes are referred to as Derived Data Types. --> An array in C is a fixed-size collection of similar data items stored in contiguous memory locations.
--> It can be used to store the collection of primitive data types such as int, char, float, etc., and also derived and user-defined data types such as pointers, structures, etc.
--> Pointers are symbolic representations of addresses.
--> They enable programs to simulate call-by-reference as well as to create and manipulate dynamic data structures.
--> Iterating over elements in arrays or other data structures is one of the main use of pointers.
--> The structure in C is a user-defined data type that can be used to group items of possibly different types into a single type.
--> The struct keyword is used to define the structure in the C programming language.
--> The items in the structure are called its member and they can be of any valid data type.
--> A union is a special data type available in C that allows to store different data types in the same memory location.
--> Union can be defined with many members, but only one member can contain a value at any given time.
--> Unions provide an efficient way of using the same memory location for multiple-purpose.
- Drop a 🌟 if you find this repository useful.
- If you have any doubts or suggestions, feel free to reach me.
📫 How to reach me:
- Contribute and Discuss: Feel free to open issues 🐛, submit pull requests 🛠️, or start discussions 💬 to help improve this repository!


