Question 25

What will be output of following program? Assume that you are running this program in little-endian processor.
#include<stdio.h>
int main() {
short a = 320;
char *ptr;
ptr = (char *)&a;
printf("%d"_,*ptr);
return 0;
}


Create a FREE account and get:

  • Download Maths Shortcuts PDF
  • Get 300+ previous papers with solutions PDF
  • 500+ Online Tests for Free

cracku

Boost your Prep!

Download App