First of all there is another question with the same title but the solutions offered there didn't work for me. Other question
#include <stdio.h>
#include <stdlib.h>
int main()
{
int a, b, c;
fflush(stdout);//suggested solution in other question
scanf("%d%d%d", &a, &b, &c);
printf("Values entered: %d %d %d\n", a, b, c);
return 0;
}
The code works fine when I run it normally.
Output
1 2 3
Values entered: 1 2 3
But when I run in debug mode nothing is printed. When I hover over the variables they have these values.
a : 56
b : 6422420
c : 6422420
Another solution suggested was to put this code in the start of the main method.
int ch;
while ((ch = getchar()) != '\n' && ch != EOF); //suggested solution #1
Both solutions suggested in the post didn't work for me. I tried them both separately.
EDIT
OS : Windows 10
Compiler : MinGW