Hi Everyone!!
I have a little problem in printing Character Arrays....
i have enclosed my code below. what problem actually i have is that when i type my first name and after first name (space bar) last name..
it prints only my first name. i want to type whole name after pressing space bar .
and do tell me what i am doing wrong??
thanks in Advance.
#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
char name[50]; int i,j;
printf("Enter Name : ");
scanf("%s",name[i]);
for (j=name[i]; j<=name[i]; j++)
{
printf("\n%s",name[i]);
}
getch();
}