Since you are using Yosemite, there should be a Recovery Partition ("normally" invisible to the user) on your internal hard drive. To boot your iMac into that partition, hold down the Command and R keys as your iMac starts up. This link describes that partition:
https://support.apple.com/en-us/HT201314
It will take some time for the boot process to complete, but eventually you will get to the main screen described in that link.
What you need to do is run Disk Utility from there and 1) Verify and Repair the disk at the
Volume (ie, top) level, and 2) Verify and Repair Permissions, and Verify and Repair the Disk, at the
Partition (ie, second) level.
Assuming that works and you can subsequently re-boot your machine, check the version of Yosemite that you have. Not sure how far along the upgrade to OS 10.10.4 went, but whether or not it got that far, it would be best if you download and install the OS 10.10.4 Combo Updater. You can get it from here:
https://support.apple.com/kb/DL1820?locale=en_US
This link also discusses issues with the flashing question mark:
https://support.apple.com/en-us/HT204323
Note that it also eventually recommends booting to the Recovery Partition. You could try the earlier suggestion in that link regarding the Startup manager, but since you were in the middle of installing an update to the OS, it might be best to try first with booting to the Recovery Partition.
Let us know if you have success with that.