No description
- C 100%
| .gitignore | ||
| README.md | ||
| stride.c | ||
| walk.c | ||
Moisture Detection 4
The moisture log again, walked with a pointer instead of an index.
What is what
| File | |
|---|---|
stride.c |
Part A run it, read it but do not edit it |
walk.c |
Parts B and C your code goes here, at each YOUR TASK |
What to do
- Part A. Before you run
stride, write down how many bytes apartpandp + 1are for achar, anintand adouble, and what*(pi + 1)and(pi + 3) - piprint. Then run it and compare. - Part B. In
walk.c, writesum_ptr()andfind(). You are done when everycheckline says PASS. - Part C. In
sum_ptr(), change<to<=so the pointer also reads atlevels + count. Predict, then run it with the plain build and with AddressSanitizer. Put<back.
Build and run
gcc -std=c17 -Wall -Wextra -o stride stride.c
./stride
gcc -std=c17 -Wall -Wextra -o walk walk.c
./walk
For Part C, add -fsanitize=address -g to the walk line.