If i buy a iphone 5c from virgin mobile but use an ultra mobile sim card instead would it work?

Would the phone except the sim card even though i bought it from virgin mobile?

It most likely wouldn't work as the phone would be locked to Virginia network. You could get it unlocked though, which would allow it to use other networks.