hi
i'm new in program
i want to write code in c .. and i'll convert it to c++
but i've problem
this is the code
#include<stdio.h>
#include<conio.h>
typedef struct std
{
int id;
char name [10];
char status;
}STD;
void main()
{
STD m;
printf("Enter id : ");
scanf("%d",&m.id);
printf("\n Enter name : ");
scanf("%c",&m.name);
printf("\n Enter status : ");
scanf("%c",&m.status);
printf("The Day Is : %d / %c / %c ",m.id,m.name,m.status);
getch();
}
Now ,
when i run code , it is run ...
i put id .. ok
the next step is to put name , the program terminated it and ask for status dirct ..
after i put status ..
the info displayed ... but the name deos not appear ..
i guss the problem with " Char Array "
i'm not good with it..
please help me..