fopen and tests

This commit is contained in:
nora 2023-10-04 21:35:18 +02:00
parent 862ef8dc22
commit b795ee80c9
14 changed files with 97 additions and 45 deletions

View file

@ -1,13 +1,14 @@
#include <string.h>
#include <assert.h>
int main(void) {
int main(void)
{
char buf[10];
memset(buf, 34, sizeof(buf));
for (int i = 0; i < 10; ++i) {
if (buf[i] != 34) {
return 1;
}
for (int i = 0; i < 10; ++i)
{
assert((buf[i] == 34) && "memset failed to write byte");
}
}