Skip to content

Instantly share code, notes, and snippets.

@karellism
Created March 3, 2019 23:27
Show Gist options
  • Save karellism/3c08fc026f6a26f198ee5ba518ce706c to your computer and use it in GitHub Desktop.
Save karellism/3c08fc026f6a26f198ee5ba518ce706c to your computer and use it in GitHub Desktop.
An example C code to read an integer from STDIN and printing it out to STDOUT.
#include <stdio.h>
int main()
{
int n;
scanf("%d",&n); //read input integer from STDIN
printf("%d",n); //print output integer to STDOUT
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment