I'm trying to do something similar to this:
int output_type=1
if (output_type==1)
char real_out[7]="binary";
else if (output_type==2)
char real_out=[6]"octal";
else if (output_type==3)
char real_out[8]="decimal";
else {
char[20]real_out="This REALLY shouldn't have happened.\n";}
}
I know the coding is kinda messy but I basically want the variable "real_out" to contain either decimal, octal or binary depending on what the value of output_type is.
I'm a newbie to C, we were learning python last semester so string operations and declaring variables is all new to me. I know a lot about strings already but some technicalities I'm learning as I go :p I wanted to do this in order to make an assignment due on Tuesday feel more "complete".