0

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;
}

online C compiler replit.com online C compiler replit.com macOS terminal macOS terminal

Neo
  • 27
  • 3

0 Answers0