[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/sci/ - Science & Math

Search:


View post   

>> No.2766306 [View]
File: 13 KB, 400x300, sankara.jpg [View same] [iqdb] [saucenao] [google]
2766306

> mfw

>> No.2671528 [View]
File: 13 KB, 400x300, sankara.jpg [View same] [iqdb] [saucenao] [google]
2671528

/* I'm here because I'm bored */

#include <stdlib.h>
#include <stdio.h>
#include <error.h>
#include <errno.h>

int
main (int argc, char **argv)
{
char *buffer = NULL;
FILE *in;

if (argc != 2)
{
fprintf (stderr, "usage: %s INPUT-FILE", argv[0]);
return -1;
}

in = fopen (argv[1], "r");

if (!in)
{
error (-1, errno, "could not open %s\n", argv[1]);
}


while (fscanf (in, "%m[A-Za-z0-9\n]", &buffer) == 1)
{
printf ("%s", buffer);
free (buffer);
}

putchar ('\n');

if (errno)
error (-1, errno, "input error");

if (!feof (in))
{
fprintf (stderr, "invalid input\n");
return -1;
}

return 0;
}

>> No.2626756 [View]
File: 13 KB, 400x300, sankara.jpg [View same] [iqdb] [saucenao] [google]
2626756

>>2626706
> capitalists destroy africa with imperialism
> insult their ideologies because they aren't doing well

Navigation
View posts[+24][+48][+96]