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!


