Add to Chrome
✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
The program has a bug that can cause a segmentation fault. To solve it, you can replace:
buf+i by &buf[i] in the write() statement
buf+i
&buf[i]
write()
char buf* by char buf[255]
char buf*
char buf[255]
char buf* by char buf[2222]
char buf[2222]
char buf* with char **buf at the beginning
char **buf
Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!