Formatted I/O and bitwise operators:

Here are a few sample programs that you may find helpful for your cache simulator assignment :

1. Example of formatted I/O :
        Explains the use of scanf and printf.
2. Bitwise operators:
        Explains use of bitwise AND, OR and shifting bits to the left and right using << and >> resp.
3. Bitwise operators (contd) :
        Sample program that shows how you can count the no. of 1's in any integer. eg 3 (0011) has two 1's , 4 (0100) has one '1' .