CS50x - Week 1

Photo by Uday Awal on Unsplash

CS50x - Week 1

C - Programming


2 min read


Week 1 of the course, mainly focused on the basics of C programming. C is a powerful programming language that forms the foundation of many other programming languages. The basics I learned included:


They are used to store values in a program like strings of text and numbers. In C they are declared with specific data types such as char for characters and int for integers.

Control structures

They are used to control the flow of a program. I learned about if statements to execute code based on whether a condition is true or false.

Another concept I learned was loops, which allow code to be executed repeatedly, and switch statements which allow code to be executed based on the value of a variable.


Finally, I learned about functions which are blocks of code that can be reused in a program. making it easier to rewrite and maintain code.


At the end of the course, I got to work on a lab and problem sets. This gave me hands-on experience in declaring variables, writing if statements and loops, and calling functions. I also got to work on a real-world programming problem where I had to think critically about how to approach each problem and work through the code step-by-step.

Overall, Week 1 has been an intense and rewarding experience and I am excited to learn more in the coming weeks.