Möchtest du ein Stück Kuchen? - Ja, gerne.
Kannst du mir bitte helfen? - Natürlich, gerne.
What type of grammatical object does "gerne" play in the above sentence?
Möchtest du ein Stück Kuchen? - Ja, gerne.
Kannst du mir bitte helfen? - Natürlich, gerne.
What type of grammatical object does "gerne" play in the above sentence?
What type of grammatical object does "gerne" play in the above sentence?
As has already been said by @HalvarF your examples are not "sentences". It is a common trait in languages to leave out implied parts. This is called an "ellipsis", which is greek and means "ommission". For instance:
Q: What time is it?
A: Eight
The person answering implies that "it is" and "o'clock" is so obvious that it isn't worth mentioning it. As every other language figure, this is not always appropriate, sometimes even bad style, but it is done nonetheless.
In your example "gerne" could be translated by "gladly so" or something similar.
Kannst du mir bitte helfen? - Natürlich, gerne.
Can you help me? Yes, [and I'll be] glad [to do so].
Basically, the "gerne" expresses that not only can one comply with what was asked, etc., but also that he will gladly do so. You can also hear that as an answer to people ordering in a restaurant or bar:
"Ein Schnitzel und ein Bier, bitte."
"Gerne."
Basically, the waiter is telling the guest that not only has he understood the order and is willing to deliver it, but he will also enjoy doing so.
You be the judge if this is anything more than a hollow phrase without any meaning if the waiter says it in response to every guests order automatically. But then "Guten Tag" doesn't usually mean the one saying it wishes the one addressed by this explicitly to have a good day either, so there is that.
"Ja, gerne" and "Natürlich, gerne" aren't sentences.
The adjectives natürlich and gerne just answer the respective question in the form of qualifying it. You can call this an adverbial use of the adjectives because they refer to the respective verb/predicate of the question.
Möchtest du ein Stück Kuchen? - Ja, gerne [möchte ich ein Stück Kuchen].
Kannst du mir bitte helfen? Natürlich [und] gerne [kann ich dir helfen].