Take a positive integer as an argument and display the sum of all prime numbers less than or equal to it.
Then compile with gcc -DTEST *.c for testing. Remove -DTEST for grading. Note: Some exam shells disable this. Safer: comment out main manually.
The bulk of Exam 01 tests your algorithmic control flow. You must be able to write nested while loops effortlessly. Loops are essential for processing strings character by character or generating coordinate patterns. Standard Outputs and Write Function exam 01 piscine 42 exclusive
Exam 01 is not a test of your C skills. It is a test of .
Displaying the alphabet, strings, or manipulating ASCII values. Pointers and Values: Simple C functions like (setting a pointer to 42) or (swapping two integer values). Math Operations: Take a positive integer as an argument and
Exam 01 is the first gatekeeper. Unlike Exam 00 (which was pure ls , pwd , and cat ), Exam 01 introduces C programming and Shell scripting . It happens at the end of the first week (usually after days 3-4 of C).
The exam uses a leveling system. You start at Level 0. Once you pass a level, you move to the next. If you fail a level, the system might give you a different problem of the same difficulty, but there is often a (cooldown) before you can try again. Note: Some exam shells disable this
The exam environment is highly restricted to ensure that candidates rely only on their own knowledge:
Passing variables by reference and understanding memory addresses. 3. Common Problem Types by Level
If you want, I can: