Hi all,
I am trying to run a simple program in order to learn c but the scanf gives me some trouble.
Below is the code:
now whenever i run the code, and give 1 as input, the printf statement which is inside the loop gives me this number: 2621256.Code:int count,num,total; for (count = 1; count < 7;count++) { printf("Num %d:",count); scanf("%d",num); printf("%d\n",num); total = total + num; } printf("total is:%d\n",total); char ch; scanf("%d",ch);
Could someone please explain me what it this number?
Kind Regards,
Ioannis



LinkBack URL
About LinkBacks




