2 power n diff settings for n 2way switches suppose that we wanted to have how many m settings

i need the coding in c or C++


pls help me out