0

I am using docker to test my C code if it works in ubuntu. I tested my code with clang and gcc in Mac-os, it works and i used VirtualBox to test in Ubuntu too, it works as well, but in docker i don't know why but scanf() ignored every time. I doesn't cause any error but it just ignores and go on the rest of code.

This my test code

int main(int argc, char** argv)
{
    printf("... main running ...\n");
    
    int a;
    scanf("%d", &a);
    printf("%d", a);

    return 0;
}
kaya3
  • 47,440
  • 4
  • 68
  • 97
cacarekt
  • 35
  • 6

0 Answers0