This is because the return types of scanf() is number of successful assignments. Here you are making just one assignment i.e assigning value to b, hence scanf() returns 1.
Don't confuse that you will get value of b as output. Second argument of printf() is scanf() hence the value displayed here will be the return value of scanf().