#include <stdio.h>
#include <string.h>
int main()
{
char plus = '+';
char minus ='\x2d';
char *one = "One";
char *two = "Two";
char three[6] = "Three";
/*if you want to print a single character*/
printf( "\n %c char \n", plus );
printf( "\n %c char \n", minus );
/*if you want to print a single character from string*/
printf( "\n %c char from string \n", three[2] );
/*if you want to print all characters from string*/
for( int i=0; i < strlen(one); i++)
{
printf( "\nindex = %d char = %c \n", i, one );
}
/*if you want to print a string*/
printf( "\n %s \n", one);
/*and, (more complex) output*/
printf( "\n %s %c %s = %s ;\n", one, plus, two, three);
printf( "\n Three %c 3 = %.2f ;\n", minus, 0.0);
return 0;
}