What is the difference between 7474 and 7479 ICs? How do they differ from 4013?
Yes, you can use a 7474 to divide by two. 

BUT the set and reset inputs are active low in the 7474, whereas they are active high in the 4013.

This means that to divide by 2, the set and clear must be pulled up or connected to the rail, not to ground.

One further point, with CMOS, inputs should not be left floating, BAD things can happen. Take all inputs on unused sections of the device to rail or ground, it doesn't matter which, obviously take all used inputs to the correct logic level. Outputs should be left unconnected if not used.

Download a data sheet for both parts and study them carefully for pinout and pin function, IIRC the packages are not pin-compatible, so you will have to change the pin numbers as well.