Skip to content

Instantly share code, notes, and snippets.

@Algomancer
Created August 29, 2019 11:41
Show Gist options
  • Save Algomancer/3ec566c0f2e97ebae21c41888196c47e to your computer and use it in GitHub Desktop.
Save Algomancer/3ec566c0f2e97ebae21c41888196c47e to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <stdlib.h>
#define N 16 /* buffer size */
int main(void) {
char name[N]; /* buffer */
/* prompt user for name */
printf("What's your name? ");
scanf("%s", name);
printf("Hi there, %s!\n", name); /* greet the user */
return EXIT_SUCCESS;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment