any one with an idea on how to write a c code for a truth or dare game?
You need a list of players (vector of strings), and then if you want questions/dares to be stored or populated by the players you need to store them also (it can be just strings with placeholders or instances of classes with meta information).
I have a very similar game for telegram (but it's written in go, and it's basically only dares), it supports session management and players enter dares that will be executed at random, they are saved as strings in my case.
https://github.com/gameraccoon/telegram-the-king-says-bot