I have been searching the boards but could not find an answer to my question. I am trying to store a word. I have tried many different things but I think the closest was this:
I think I am on the right track, just my syntax is wrong.Code:char x[256]; switch (input) { case 1: answer = a + b; char x = 'sum'; // wanting to store the word "sum" break; case 2: answer = a - b; char x = 'difference'; // wanting to store the word "difference" break; case 3: answer = a * b; char x = 'unknown'; // wanting to store the word "unknown" break; case 4: answer = a / b; char x = 'quotient'; // wanting to store the word "quotient" break; }