I have two questions here.
Q1: What will the following program output(on a 32-bit little-endian machine):
int main()
{
long long a = 0x1, b = 0x2, c = 0x3;
printf("a = %d, b = %d, c = %d.\n", a, b, c);
return 0;
}
and why?
Q2:
Why the output of a
, b
and c
are different?
void func(int a, int b, int c)
{
printf("a = %d, b = %d, c = %d.\n", a, b, c);
}
int main()
{
long long a = 0x1, b = 0x2, c = 0x3;
printf("a = %d, b = %d, c = %d.\n", a, b, c);
func(a, b, c);
return 0;
}