Can someone tell me what am I doing wrong? The printed values are not the characters I input. I'm writing the code this way because I'm having trouble returning two values from the info function.
Code:#include <stdio.h> char info () { char x; printf("Insert a character: "); getchar(); scanf("%c", &x); return x; } void main () { char a, b, x; info (); a = x; info (); b = x; printf("%c and %c", a, b); }