Rough example code to get a pointer to the string from the label widget and the button widget.
const gchar *string;
/* Gets a string pointer from the label widget */
string = gtk_label_get_label (GTK_LABEL (a_label));
/* Gets a string pointer from the button widget */
string = gtk_button_get_label (GTK_BUTTON (a_button));
Note in both cases the returned pointer can be NULL, the string belongs to the widget so must not be modified or freed.
Since you are a beginner I would suggest that you have a look at some examples and work through some of the tutorials. A fairly good one can be found at http://zetcode.com/tutorials/gtktutorial/
. There are may others listed here on the forum under a sticky topic called Tutorials and Resources http://www.gtkforums.com/viewtopic.php?f=3&t=988