Can scanf() store values?
Hi I am now learning the C language and I have a little problem with a
exersice of the book i read.... My code is this
#include<stdio.h>
int main()
{
unsigned char one=0; unsigned char two=0;
printf("Quantity 1 = ");scanf("%d",&one);
printf("Quantity 2 = ");scanf("%d",&two);
printf("The value is %d",one);
return 0;
}
Why when i am trying to see the value of one it appears the initial value
and not the value after the scanf ? Can you Explain me please Why ? THANK
YOU
No comments:
Post a Comment