Completed p1 in C