173 views
0 votes
0 votes

What should be the answer of the below code?

Please explain the logic used.

#include <stdio.h>
int main() {
        int i = 258;
        int *iptr = &i;
        printf("%d%d", *((char*)iptr), *((char*)iptr + 1));
}

 

Please log in or register to answer this question.

Related questions

0 votes
0 votes
0 answers
1
0 votes
0 votes
1 answer
2
parthbkgadoya asked Feb 1, 2017
325 views
1 votes
1 votes
1 answer
4
shikharV asked Nov 15, 2015
1,038 views
The answer to the above problem is A but I am expecting it to be D as constant amount of work is required to solve each subproblem.