This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.
See the CrossGCC FAQ for lots more information.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
PROGRAM:
#include<stdlib.h> #include<stdio.h> #include<string.h> #include<unistd.h>
int main() { unsigned char buffer[8], i; int *ptr = (int *) buffer;
printf("size of int is: %d\n", sizeof(int)); memset(buffer, 0xff, sizeof buffer);
*(ptr + 1) = 0x1234;
for (i=0; i<(sizeof(buffer) +1); i++) printf("buffer[%d]=%x\n", i, buffer[i]); }
-- For unsubscribe information see http://sourceware.org/lists.html#faq
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |