Skip to content

Commit eed465e

Browse files
committed
Update FileOperations for Rules.
1 parent 2f5640c commit eed465e

File tree

30 files changed

+43
-37
lines changed

30 files changed

+43
-37
lines changed

FileOperations/Feof-EndOfFileDetection/Feof-EndOfFileDetection.layout

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
<CodeBlocks_layout_file>
33
<FileVersion major="1" minor="0" />
44
<ActiveTarget name="Debug" />
5-
<File name="main.c" open="1" top="1" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
5+
<File name="main.c" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
66
<Cursor>
7-
<Cursor1 position="437" topLine="0" />
7+
<Cursor1 position="451" topLine="0" />
88
</Cursor>
99
</File>
1010
</CodeBlocks_layout_file>
Binary file not shown.

FileOperations/Feof-EndOfFileDetection/main.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include <stdlib.h>
22
#include <stdio.h>
3+
#include <conio.h>
34

45
#define BUF_SIZE 100
56

@@ -18,9 +19,10 @@ int main()
1819

1920
while(!feof(fp)){
2021
fgets(buf, BUF_SIZE, fp);
21-
printf("%s",buf);
22+
printf("%s", buf);
2223
}
2324
fclose(fp);
2425

26+
getch();
2527
return(0);
2628
}
Binary file not shown.

FileOperations/Fopen/Fopen.layout

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
<CodeBlocks_layout_file>
33
<FileVersion major="1" minor="0" />
44
<ActiveTarget name="Debug" />
5-
<File name="main.c" open="1" top="1" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
5+
<File name="main.c" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
66
<Cursor>
7-
<Cursor1 position="814" topLine="0" />
7+
<Cursor1 position="554" topLine="1" />
88
</Cursor>
99
</File>
1010
</CodeBlocks_layout_file>
0 Bytes
Binary file not shown.

FileOperations/Fopen/main.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,15 @@ int main()
1111
gets(file_name);
1212
printf("\nEnter a mode (max 3 character): ");
1313
gets(mode);
14-
if((fp = fopen( file_name, mode )) != NULL){
14+
if((fp = fopen(file_name, mode)) != NULL){
1515
printf("\nFile name: %s mode: %s\n", file_name, mode);
1616
fclose(fp);
1717
puts("Exit = x");
1818
if((getc(stdin)) == 'x')
1919
break;
2020
else
2121
continue;
22-
}
23-
else{
22+
} else{
2423
fprintf(stderr, "\nFile name %s mode error: %s.\n", file_name, mode);
2524
puts("Exit = x");
2625
if((getc(stdin)) == 'x')

FileOperations/Fopen/obj/Debug/main.o

0 Bytes
Binary file not shown.

FileOperations/Fprintf-Write/Fprintf-Write.layout

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
<CodeBlocks_layout_file>
33
<FileVersion major="1" minor="0" />
44
<ActiveTarget name="Debug" />
5-
<File name="main.c" open="1" top="1" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
5+
<File name="main.c" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
66
<Cursor>
7-
<Cursor1 position="459" topLine="0" />
7+
<Cursor1 position="478" topLine="9" />
88
</Cursor>
99
</File>
1010
</CodeBlocks_layout_file>
Binary file not shown.

0 commit comments

Comments
 (0)