Program does not printf after spaces.
This program is suppose to be able to display the full address when inputed.
It can only display what is entered before the user hits the space bar.
For example:
When the program ask for the address i'll enter:
254 Marios Castle Lala Land 93884
And only 245 will be displayed.
Here is the code:
PHP Code:
//Write program to display name, address, email address, and with a border.
#include <stdio.h>
void main(void)
{
char name[50];
char address[50];
char email_address[50];
printf("\nPlease type your name:\n");
scanf("%s", &name);
printf("%s \n", name);
printf("\nPlease enter your address:\n:");
scanf("%s", &address);
printf("%s \n", address);
printf("\nPlease enter your email address:\n:");
scanf("%s", &email_address);
printf("%s\n", email_address);
}