Solution :
int main () {
*(char *)(15) = 5;
}
--
Problem : In a 8 bit memory, print True if the value in 3rd address 4th bit is 1, else if the value is 0 print False.
In the 3rd address, we have a binary value. E.g : 11010011. But we don't know that value.
8 Bit Memory
-----------
|.............| 0
|.............| 1
|.............| 2
|11010011| 3
|.............| 4
|.............| 5
|.............| 6
|.............| 7
-----------
I've to get the value in 3rd address and check 4rd bit if it is 1 or 0. And print true - false.
I don't have enough information about pointers to solve that problem. Thanks for replies.
Edited by SLiM_BoY, 01 October 2011 - 02:00 PM.


Sign In
Create Account

Back to top









