Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
#include <stdio.h>
#include <cs50.h>
#include <string.h>
int main(void)
// use printf to type out each character of the user's name
// separate with pipes to represent each character taking up
// some space in memory
string name = get_string("enter your name: ");
printf("result: ");
for (int i = 0; i < strlen(name); i++)
printf("| %c ", name[i]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment