Develop a C program to set the file pointer at the beginning of file using fseek()

Code

#include <stdio.h>

int main () {
FILE *fp;

fp = fopen("sample.txt","w+");
fputs("I am awesome I know but at I have no life lol", fp);
fseek( fp, 0, SEEK_SET );
fputs("C Programming Language", fp);
fclose(fp);
return(0);
}

Output

sample.txt file will look like following after execution

C Programming Languaget at I have no life lol