Cedric would immediately offer his friendship and support to Harry. He would keep an eye on Harry at all times to make sure the abuse doesn't continue. He could also try to find out if there are any spells or potions in the wizarding world that could help Harry heal from the emotional and physical trauma. He might talk to the other houses' prefects to raise awareness about Harry's situation so that everyone can be on the lookout for any signs of further abuse.
Cedric might first talk to Harry privately to get all the details. Then he could go to Dumbledore for help.
Cedric would probably be very angry.
He might be shocked at first. Then he could feel a strong sense of protectiveness towards Harry. Maybe he immediately tries to find ways to keep Harry safe from further harm, like staying closer to him at all times.
In this kind of fanfiction, Cedric might feel shocked and angry. He could decide to protect Harry from further harm. Maybe he'll try to find the abuser and put a stop to it.
Well, in some fanfictions, Cedric might use his magical skills to shield Harry from physical attacks. For example, he could cast protective spells like Protego Maxima to create a strong shield around Harry when they are in danger. Maybe in a situation where dark wizards are attacking, Cedric steps in front of Harry and uses his wand to fend off the spells aimed at Harry.
Cedric would be deeply troubled. In the wizarding world, they have their own code of honor and respect. Finding out about Harry's abused fanfiction would go against everything Cedric stands for. He might start to question the morality of the Muggle world that allows such things to be written. He would also feel a sense of sadness for Harry, knowing that someone out there has created a story that portrays him in such a negative and harmful light. Cedric might even consider taking some sort of action, like talking to Harry about it or trying to get the fanfiction removed if he could, though that would be a complex matter given the nature of fanfiction and the different worlds they live in.
It deepens their bond. Harry starts to trust Cedric more, seeing him as a reliable friend. This protectiveness makes Harry feel safe around Cedric.
He may report the abuse to the relevant authorities in the fanfiction setting.
Cedric could also try to find out more about the origin of the fanfiction. He might use his connections in the wizarding world or even try to understand Muggle ways of tracking down information. Once he has more information, he could decide whether to confront the writer, if possible, or simply try to protect Harry from the negative impact of such a story. For example, he could make sure Harry doesn't accidentally come across it and get hurt by it.
There's a fanfiction called 'Cedric's Unfinished Story'. In this one, it explores what could have happened if Cedric had survived the Triwizard Tournament. It's really interesting as it weaves new adventures for Cedric, involving him in the fight against Voldemort in a different way.
Friendship is a very common theme. Given their initial rivalry in the Triwizard Tournament, many fanfictions explore how they move past that and become true friends. Another theme is mutual respect. They both have their own strengths and in fanfictions, they often come to respect each other deeply.