R
Roman Mashak
Hello, All!
Given the sample piece of code I have:
#include <stdio.h>
#include <string.h>
int main(void)
{
short int i, j;
int k;
i = j = 10;
k = i + j;
return 0;
}
So, here I expect that 'i' and 'j' will be type-casted to 'int' type, while
in debugger (exploring memory dump) I see these variables still occupy 2
bytes (i.e. 'short' type).
Is it normal behavior? I suppose, I just don't catch some point.
With best regards, Roman Mashak. E-mail: (e-mail address removed)
Given the sample piece of code I have:
#include <stdio.h>
#include <string.h>
int main(void)
{
short int i, j;
int k;
i = j = 10;
k = i + j;
return 0;
}
So, here I expect that 'i' and 'j' will be type-casted to 'int' type, while
in debugger (exploring memory dump) I see these variables still occupy 2
bytes (i.e. 'short' type).
Is it normal behavior? I suppose, I just don't catch some point.
With best regards, Roman Mashak. E-mail: (e-mail address removed)