-
-
Save elderica/8ab654f93ab2e9b4d43bdbdbbb1a223b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
int main(void) { | |
char buf[100]; | |
scanf("%s", buf); | |
printf("%s\n", buf); | |
scanf("%s", buf); | |
printf("%s\n", buf); | |
return 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang racket | |
(define-values (sp out in err) | |
(subprocess #f #f #f | |
"/tmp/a.out" | |
)) | |
(displayln "hello" in) | |
(flush-output in) | |
(printf "~a" (port->string out)) | |
(displayln "AAAAAAAA" in) | |
(flush-output in) | |
(printf "~a" (port->string out)) | |
(close-input-port out) | |
(close-output-port in) | |
(close-input-port err) | |
(subprocess-wait sp) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment