The froghemoth from Volo's Guide to Monsters has a tentacle attack that can grapple a target from 20ft away. Grappling means that a targets speed is reduced to 0. Does that mean that characters cannot attack the froghemoth with melee attacks if they are 20ft away and grappled?
According to Jeremy Crawford's unofficial ruling, the character can attack the grappler
The intent is that monsters that are grappling a creature can be attacked through their limbs. Lead rules designer Jeremy Crawford ruled on twitter that "A creature grappled by a giant octopus can attack the octopus via the grappling tentacle." Giant octopi have 15 foot reach with their tentacles.
The rules don't assume you're playing with grid and don't give special treatment to specific body parts. The designers might've expected that it would be obvious that part of the creature is within your reach in this case, or that most DMs would allow it since it's a perfectly sensible thing to do. That said, the rules certainly don't give the impression that you can do this, and it would've been nice if it had been spelled out explicitly if this was the intent all along.
No, it only prevents melee attacks that don't have 20' reach.
The Froghemoth has a 20' Reach Melee Attack, which if successful, then (Volos, 145):
the target is grappled (escape DC 16) if it is a Huge or smaller creature.
Grappled reduces a creature's speed to zero, so they would not be able to move closer to the Froghemoth.
This would remove any potential melee attack unless the creature has a 20' reach.
They can still use any sort of ranged attack without any problem.
20' reach does not mean you can attack the Tentacle grappling you
Without any sort of given mechanic that allows you to attack the tentacle (like the Roper), adding that to the monster stat block would be a Home Rule. The RAW is that tentacle is not a viable target for the Froghemoth. Losing the reach advantage would potentially be a very big change and should change the CR rating of the Froghemoth. Comparing the two, a Roper is CR5, while the Froghemoth is CR10. It's a more powerful creature, let it be more powerful.
Players can attack the Grappling monster's tentacles
The Players can not attack creatures outside of their five foot attack range, ten depending on your weapon. However Jeremy Crawford has stated on twitter that you can attack a Giant Octopus by attacking the arm that is grappling you, which would give us an exception to the normal attack range as you attack its arm.
As NathanS has pointed out, you might want to take a look at the Roper MM (pg. 261) if you'd like to include something on having tentacles fall off after a certain amount of damage, or making them harder to hit than normal as in the case with the Roper.
This doesn't work for all monsters, attacking what they use to grapple you, as some creatures can grapple you from afar with things that aren't parts of their body, such as chains.
Choose a target. Pick a target within your attack’s range: a creature, an object, or a Location.
The above are the rules for making an attack.
While a creature controls a certain space around it and are presumed to be there, if they are using a limb to hold a creature, that limb is holding that creature even if outside the space they control. This is because that is what grabbing entails. (a creature telekinetically grabbing would be a different story).
The 5e rules do not require you to attack the space a creature is controlling, unlike previous versions of the game. The 5e rules simply require you to be able to reach the creature with your attack.
As the monster's limb is part of the creature, attacking it is attacking the creature. Some creatures have specific rules for attacking their limbs; this one does not.