Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to enter input stream #64

Open
EnziinSystem opened this issue Apr 27, 2019 · 1 comment
Open

How to enter input stream #64

EnziinSystem opened this issue Apr 27, 2019 · 1 comment

Comments

@EnziinSystem
Copy link

EnziinSystem commented Apr 27, 2019

Hello,

I don't see anyone mentioning the input stream for the program via Terminal simulator web.

If I have the following block code, how will the input stream enter?

#include <stdio.h>
int main() {
 int a;
 int b;

 scanf("%d", &a);
 printf("You entered for a: %d", a);
 scanf("%d", &b);
 printf("You entered for b: %d", b);
 return 0;
}
@asadm
Copy link
Contributor

asadm commented Apr 29, 2019

The API takes stdin as one of the params here.
There is no stream from terminal. The code is sent to server and result is returned. The API allows to send complete input in the same request which will be piped to your code when it runs. scanf and cin will work just fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants