Block size = One word.
So M words of memory means M blocks.
A two-way set-associative cache. A cache line is one word, so a cache entry contains a set of two words.
Cache entry has been defined to be a set, not line.
There are C cache entries in the cache, so, there are C Sets in the cache.
There are M blocks in main memory.
In set-associative cache, if there are n sets then a block number B of main memory will go to the set number .
So, to each set, there will be
blocks which will map to each set(cache entry).
Note that the number of words of memory map to the same cache line :
Inside a set, the block can go to any line, So, blocks map to a particular line in the cache.