He could be overjoyed if he believes the child is his. He would see it as a continuation of his lineage and a sign of their love. He might start making plans for the child's future, like ensuring the best education and training in Camelot.
Arthur might be initially shocked and confused. He's used to Merlin being in control. But then he might find it quite hilarious and start teasing Merlin about it.
Merlin could be heartbroken. He might retreat into himself and become more withdrawn. After all, he has a deep bond with Arthur, and this sudden break - up would be a huge shock.
Merlin would be very worried. He would probably stay by Arthur's side day and night, using his magic secretly to try and heal him. He might also search for rare herbs or magical items that could cure Arthur.
His family might be shocked at first. Ginny, for instance, would be really confused as Arthur is usually the one keeping order. She might try to be extra good to make up for his mistake.
Merlin would probably be very conflicted. On one hand, he is loyal to Arthur and Camelot, but on the other, being forced into a marriage is a huge infringement on his freedom. He might be scared about how this will change his life and his ability to use his magic secretly. Arthur, on the other hand, could be initially resistant as well. He sees Merlin as a friend and a servant, and this sudden change to a marital relationship would be strange for him.
He might be initially startled. Arthur is used to a certain propriety in the court, so having Merlin suddenly on his lap would catch him off - guard. But then, depending on their relationship at that point, he could either laugh it off if they are in a very friendly stage or he might be a bit flustered and ask Merlin to get up if there are other people around.
Arthur might be shocked and immediately want to protect Harry. He could start by confronting those who are abusing Harry or find a safe place for Harry to stay.
Well, Arthur's reaction can be complex. At first, he might be angry because Merlin has kept this big secret from him. However, as he thinks about all the times Merlin has saved his life with magic, he begins to see that magic isn't all bad. He may feel betrayed, but also grateful in a way.