You compile the following piece of code on a little-endian machine that encodes integers as four bytes. What does it print out? int main() { unsigned int number = 100000; unsigned int* pointer = &number; unsigned char* char_pointer = (unsigned char*) pointer; printf ("%d\n", *(char_pointer+1)); return 0; 1 134 160 O O O O

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter10: Pointers
Section10.3: Pointer Arithmetic
Problem 5E
icon
Related questions
Topic Video
Question
You compile the following piece of code on a little-endian machine that encodes integers as four bytes. What does it print out?
int main () {
unsigned int number = 100000:
unsigned int* pointer = &number;
unsigned char* char_pointer = (unsigned char*) pointer;
printf ("%d\n", *(char_pointer+1));
return 0:
}
1
134
160
O O O O
Transcribed Image Text:You compile the following piece of code on a little-endian machine that encodes integers as four bytes. What does it print out? int main () { unsigned int number = 100000: unsigned int* pointer = &number; unsigned char* char_pointer = (unsigned char*) pointer; printf ("%d\n", *(char_pointer+1)); return 0: } 1 134 160 O O O O
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Instruction Format
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr