Don't use any of those sentences - both sound strange, and no native speaker would use them. "Ein Beispiel machen" is at least colloquial - i wouldn't expect it in a book. Instead, use a different verb that fits better. For example:
- [einen Sachverhalt] veranschaulichen
- [ein bestimmtes Verhalten] demonstrieren, vorführen
- [ein bestimmtes Stilmittel] [beispielhaft / beispielhalber] verwenden, einsetzen, nutzen, wählen
As in my last example, you may additionally use an adjective ("beispielhaft") or adverb ("beispielhalber") that stems from "Beispiel".
EDIT:
In a complete sentence, i would write:
Welches Stilmittel wird in diesem Satz verwendet (or: genutzt / benutzt / eingesetzt)?
Explanation: You can't use "ist verwendet", unless you continue "... worden". Also, i've replaced "obiger" by "diesem", assuming that the reference is clear enough, and "obiger" sounds quite "officialese".