I wrote this code :
#include <stdio.h>
int main()
{
int a,b = 10,c,d;
a = printf("b is %d\n",b);
c = printf("a is %d\n",a);
d = printf("c is %d\n",c);
printf("d is %d\n",d); // lose a null terminator in the previous strings ?? c and d
// are 7, but a is 8, and when you count characters in a's string theres 8,
// and also 8 in c, and d, yet c and d only retain a 7 value count. WHY?
a = a + b + c + d; // now lets add them together
printf("Added together %d\n",a); // print the result. Confused ???
return 0;
}
Why is a 8 characters long and the a integer equal to 8, but integer c and integer d are both equal to 7, but they too are 8 characters in length ?