You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
box-o-sand/oldstuff/lcthw-remnants/ex24_iofunctions01.c

20 lines
363 B

#include <stdio.h>
#include "dbg.h"
int main(int argc, char *argv[])
{
int a, b, rc;
char c;
printf("Reading from stdin: <a:number> <b:number> <c:letter>\n> ");
rc = fscanf(stdin, "%d %d %c", &a, &b, &c);
check(rc == 3, "Failed to read from stdin.");
printf("Read in: a=%d b=%d c=%c\n", a, b, c);
return 0;
error:
return 1;
}