This is the code I am using.
I wanna know why I am getting this kinda output moreover different output in online compiler and macOS.
#include<stdio.h>
int main(){
int variable;
printf("Enter\n");
scanf("%[^\n]",&variable);
printf("char = %c\n",variable);
printf("int = %d\n",variable);
return 0;
}