(a) When digits can be repeated:
The units place can be filled by the 4 even numbers in ways. For each of these the remaining places can be filled in 6, 7, 7 ways
∴ the numbers are 6 × 7 × 7 × 4 = 1176.
(b) When digits are not repeated:
Case 1: O is filled in units place thousandth place can be filled in 6 ways
∴ the number of ways = 6 × 5 × 4 × 1 = 120 ways.
Case 2: O is not filled in units place and not in thousandth place also :: the units place can be filled in 3 ways (2 or 4 or 6)
∴ The number of ways = 5 × 5 × 4 × 3 = 300 ways
∴ The total number of ways = 300 + 120 = 420 ways