C programming scanf function help... urgent
I tried to write multiple scanf statements but the program generate some garbage value. Here is the program
Code:
#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
char a,b,c;
printf("Enter three character\n");
scanf("%c",a);
scanf("%c",b);
scanf("%c",c);
printf("The characters entered are %c %c %c", a,b,c);
getch();
}
This is the answer generated.
Enter three character
s
d
The characters entered are Å ╖ 2
I am using window 7 x86 version.
Please help with the solution ASAP.
Thank you.