AD1

Monday, 1 May 2017

Find the output of the following code


#include <stdio.h>
#include <stdlib.h>
int main(int argc, char** argv) {
unsigned int i=257;
int *iptr=&i;
for(int j=0;j<=3;j++)
{
printf("%d\t",*((char*)iptr+j));
}
return (EXIT_SUCCESS);
}
view raw q148.c hosted with ❤ by GitHub
Output 

1    1    0    0

Explanation






No comments:

Post a Comment