Created
March 3, 2019 23:28
-
-
Save karellism/771e96bba63aba8702a23652d1f6a99a to your computer and use it in GitHub Desktop.
An example C code to read a string from STDIN and printing it out to STDOUT.
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() | |
{ | |
char a[100]; //assuming that string size will not exceed 100 | |
scanf("%s",a); //read a string in array a | |
printf("%s",a); //print out array a | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment