#include <stdio.h>
int main()
{
int a = 5;
int b = 10;
int c = 15;
printf("sizeof(int) = %i\n",sizeof(int));
printf("%i %i %i\n",a,*(&a+1),*(&a+2));
}
Output:
sizeof(int) = 4
5 10 15
If an int is 4 bytes then why does incrementing memory by 1 instead of 4 display the next int value?

New Topic/Question
Reply



MultiQuote





|