ras le bol
This commit is contained in:
@@ -67,33 +67,33 @@ int read_bytes(const char *filename){
|
||||
$ cat does_exist.txt
|
||||
Hey, as you can see, this file is not empty and therefore you can open it, read it, and close it!
|
||||
*/
|
||||
|
||||
/*
|
||||
int main()
|
||||
{
|
||||
int a = read_n_bytes("does_exist.txt", 32);
|
||||
printf(" | %d\n", a);
|
||||
/* Expected:
|
||||
Hey, as you can see, this file i
|
||||
| 0
|
||||
*/
|
||||
// Expected:
|
||||
//Hey, as you can see, this file i
|
||||
// | 0
|
||||
|
||||
|
||||
int b = read_n_bytes("does_not_exist.txt", 5);
|
||||
printf(" | %d\n", b);
|
||||
/* Expected:
|
||||
| 1
|
||||
*/
|
||||
// Expected:
|
||||
// | 1
|
||||
|
||||
a = read_bytes("does_exist.txt");
|
||||
printf("--> Return code: %d\n", a);
|
||||
/* Expected:
|
||||
Hey, as you can see, this file is not empty and therefore you can open it, read it, and close it!
|
||||
--> Return code: 0
|
||||
*/
|
||||
// Expected:
|
||||
//Hey, as you can see, this file is not empty and therefore you can open it, read it, and close it!
|
||||
//--> Return code: 0
|
||||
|
||||
|
||||
b = read_bytes("does_not_exist.txt");
|
||||
printf("--> Return code: %d\n", b);
|
||||
/* Expected:
|
||||
--> Return code: 1
|
||||
*/
|
||||
// Expected:
|
||||
//--> Return code: 1
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user