This repository showcases 10 lab projects from the CS1412: Programming Principles course at Texas Tech University. Each lab targets a core concept in C programming, offering hands-on practice with essential topics like arithmetic operations, string manipulation, file handling, dynamic memory management, and data structures including arrays, structs, and linked lists. Through these projects, I developed a solid grounding in the principles of C programming, enhancing my ability to write efficient, organized, and reliable code.
-
Lab 1: Tip Calculator
- Topic: Basic Input/Output and Arithmetic Operations
- Description: Develops a practical tool to calculate tips and total bill amounts per person, showcasing skills in handling user inputs and performing arithmetic operations.
-
Lab 2: Orbital Speed Calculation
- Topic: Mathematical Computations and Functions
- Description: Computes the orbital speed of a satellite given its altitude, highlighting proficiency in mathematical computations and function-based programming.
-
Lab 3: Prime Numbers and String Manipulation
- Topic: Loops, Prime Number Calculation, and String Operations
- Description: Features functions to calculate prime numbers up to a specified limit and to reverse a string, demonstrating mastery of loops and foundational string operations.
-
Lab 4: Unique Array Elements
- Topic: Arrays and Element Uniqueness
- Description: Identifies and displays unique elements in an array, illustrating skills in array handling and efficient data processing.
-
Lab 5: String Character Analysis
- Topic: String Manipulation and Character Counting
- Description: Analyzes strings to count occurrences of uppercase letters, lowercase letters, vowels, and digits, highlighting attention to detail and understanding of character data types.
-
Lab 6: Palindrome Checker
- Topic: Recursion and String Manipulation
- Description: Implements a recursive approach to determine if a string is a palindrome, showcasing recursive problem-solving techniques and string manipulation.
-
Lab 7: Bacterial Data Search
- Topic: File Handling and Data Search
- Description: Reads bacterial data from an external file and allows users to search for specific triplet combinations, demonstrating skills in file I/O and structured data search.
-
Lab 8: Basic String Encryption and Decryption
- Topic: String Manipulation and Basic Encryption
- Description: Provides basic encryption and decryption functionalities by shifting character values, illustrating introductory concepts in data encryption and secure string handling.
-
Lab 9: Matrix Transposition
- Topic: Arrays and Matrix Operations
- Description: Transposes a matrix by switching rows and columns, demonstrating practical use of two-dimensional arrays and matrix manipulation.
-
Lab 10: Inventory Management System
- Topic: Structs, File Handling, and Conditional Logic
- Description: Reads and processes inventory data from a file to identify items requiring restocking, showcasing struct-based data organization and conditional decision-making.
- Clone the repository:
git clone https://github.com/your-repo/programming-principles.git
- Navigate to the lab folder of your choice.
- Compile and run the C program using a C compiler (e.g., GCC):
gcc Lab1.c -o Lab1 ./Lab1
Completing these labs provided me with hands-on experience in fundamental and advanced aspects of C programming, strengthening my skills in areas critical to software development:
- Writing Clean & Efficient Code: Gained proficiency in writing well-structured and optimized C code, adhering to best practices for readability and performance in various applications.
- Mastering Data Structures: Developed a solid understanding of both foundational and complex data structures, including arrays, structs, and linked lists, and applied them effectively to solve multifaceted problems.
- Algorithm Development & Problem Solving: Built and implemented algorithms tailored to real-world scenarios, honing my problem-solving abilities and deepening my understanding of computational efficiency and algorithmic thinking.
- File Handling & Memory Management: Acquired practical experience in file handling and dynamic memory allocation for efficient data processing and manipulation, with a strong focus on managing memory safely and effectively.
- Mathematical Computations & Logical Reasoning: Enhanced my skills in performing complex mathematical operations and applying logical reasoning within code, preparing me for future challenges that require precision and accuracy.
These projects solidified my understanding of core programming concepts and equipped me with the practical skills necessary to tackle real-world coding challenges, laying a strong foundation for further development in software engineering and related fields.