School Commit Init

This commit is contained in:
2024-08-31 12:07:21 +03:00
commit 0b130ee18c
2801 changed files with 4720552 additions and 0 deletions
@@ -0,0 +1,26 @@
#include<stdio.h>
int main(){
FILE *fp;
int i,c,cnt=0;
char buff[1000];
fp=fopen("file1.txt","r");
if(fp==NULL){
perror("Error in opening file\n");
return (-1);
}
do{
for(cnt=0;(c=fgetc(fp)) != "\n" && c!=EOF;cnt++){
buff[cnt]=c;
}
buff[cnt]='\0';
for(i=cnt-1;i>=0;i--){
printf("%c",buff[i]);
}
printf("\n");
if(feof(fp)){
break;
}
}while(1);
fclose(fp);
return 0;
}