Q:

why scanf doesn't read zero

I'm really newbie. I use scanf to read from the input and assign it to a variable. When I printf the variable it prints 1 instead of zero. This is my code:
#include <stdio.h>

int main()
{
   int a = scanf("%d", &a);
   printf("%d", a);

   return 0;
} 

A:

scanf returns 1 as success:
int a = scanf("%d", &a);

Change this to:
int a;
scanf("%d", &a);

