Practice ยท 2 of 3
Guarded Write
Implement int try_set(int *p, int value): if p is NULL return 0 and change nothing; otherwise store value and return 1.
Difficulty: beginner
Press Submit to check your solution.
Back to lesson: Practice: NULL Guard Duty