logo

Crowdly

What will be the output of the following code? #include <iostream> using nam...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

What will be the output of the following code?

#include <iostream>

using namespace std;

int main() {

    int num=0x1234567;

    unsigned char *byte_ptr = (unsigned char *)&num;

    for (int i = 0; i < sizeof(num); i++) {

        cout << hex << +byte_ptr[i] << " "; }

    return 0;

}

0%
0%
100%
0%
More questions like this

Want instant access to all verified answers on do.ipo.kpi.ua?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!