Welcome to my C programming journey! 🚀
I usually use high-level languages like Java, JavaScript, and Python. However, I’ve decided to dive into C to deepen my understanding of programming fundamentals. Learning C is not just about adding another language to my toolbox; it's about exploring the roots of programming and understanding how things work under the hood.
C is a powerful language that’s closer to the hardware compared to the high-level languages I usually work with. By learning C, I aim to get a better grasp of memory management, pointers, and how programs execute at a lower level. It’s a great way to appreciate the efficiency and performance aspects that higher-level languages often abstract away.
This repository contains various exercises and challenges I’ve completed while learning C. The exercises range from simple "Hello, World!" programs to more complex algorithms and data structures. Each exercise is stored in its own directory, and I’ve included the problem statements and my solutions.
I requested these exercises from ChatGPT by providing a specific prompt to generate a series of progressive challenges, designed to take me from a beginner to an advanced level in C programming. Here’s the prompt I used:
"I am a software developer with knowledge in Java, JavaScript, and Python, among others, and I'm curious about low-level languages like C or Rust. Could you help me by creating a series of typical exercises that take me from zero to hero in C? Each statement should include examples to clarify any complex concepts. Remember, give me one at a time and only provide the solution when I explicitly ask for it."
Here’s an example of one of the exercises generated by ChatGPT:
Exercise 2: Calculate the Sum of an Array
Write a C program that calculates the sum of all the elements in an array of integers. The program should
- Define an array of integers with at least 5 elements.
- Use a for loop to iterate over the array and calculate the sum of its elements.
- Print the sum at the end.
Example
If the array contains the elements [2, 4, 6, 8, 10], the program should output:
The sum of the array elements is: 30
If you notice any mistakes or have suggestions, I’m all ears! I appreciate any feedback so don't hesitate to open an Issue on GitHub.
Happy coding! 😊