I survived Week 1 of my Low-Level Engineering challenge. π
This week wasn't just about syntax; it was about mental models. I learned that high-level languages like Python and JS hide a massive amount of complexity from us.
The Big Takeaways:
- Arrays are a Lie: They are just pointers to the first element.
arr[i]is just syntactic sugar for*(arr + i). - Memory has Geography: The Stack is safe but small. The Heap is massive but dangerous. You have to choose where your data lives.
- Strings don't exist: They are just char arrays that hope you didn't forget the null terminator
\0.
The Code
I wrote a summary program that uses a Struct to recap the week's stats.
// Day 7: Weekly Retrospective
#include <stdio.h>
struct Week1 {
int days_coded;
char *topics_mastered[4];
char *biggest_struggle;
};
int main() {
struct Week1 recap = {
.days_coded = 7,
.topics_mastered = {
"Pointer Arithmetic",
"Stack vs Heap",
"Null Terminators",
"Structs"
},
.biggest_struggle = "Understanding Array Decay"
};
printf("Week 1 Status: COMPLETE β
\n");
printf("Struggle: %s\n", recap.biggest_struggle);
return 0; // Ready for Week 2
}
π View the source code on GitHub:https://github.com/Ujjawal0711/30-Days
Top comments (0)