I can't seem to successfully output characters with spaces. I inputted using getchar().
Any other ideas?
Thank you in advance!
Code:
printf ("Enter the Title [Use dots instead of spaces]: ");
int i = 0;
int c1;
while (( c1!= '\n')&& (i <21))
{
new_name->title[i] = c1;
i++;
c1= (char)getchar();
}
new_name->title[i] = '\0';
while (( c1= (char) getchar()) != '\n');
OutPut:
Code:
void list_names (void)
/* List all names in the book */
{
REMINDER *tmp_ptr; /* Traverses list */
printf ("All names in address book:\n");
tmp_ptr= hol;
while (tmp_ptr != NULL)
{
printf ("title: %s\n",tmp_ptr->title);
}
}