This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 269406 - printf() doesnt output to console until scanf() end
Summary: printf() doesnt output to console until scanf() end
Status: RESOLVED DUPLICATE of bug 165437
Alias: None
Product: cnd
Classification: Unclassified
Component: Project (show other bugs)
Version: 8.2
Hardware: PC Windows 10
: P2 normal (vote)
Assignee: ilia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-21 23:55 UTC by Sceliphron
Modified: 2017-04-05 12:13 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log (39.47 KB, text/plain)
2016-12-21 23:55 UTC, Sceliphron
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sceliphron 2016-12-21 23:55:18 UTC
Product Version = NetBeans IDE 8.2 (Build 201609300101)
Operating System = Windows 10 version 10.0 running on amd64
Java; VM; Vendor = 1.8.0_111
Runtime = Java HotSpot(TM) 64-Bit Server VM 25.111-b14

Reproducibility: Happens every time

STEPS:
Run code
"#include <stdio.h>

int a,b,res;

int main(int ret1)
{
    printf("Enter two digits:\n");
    scanf("%d %d",&a,&b);
    res=a+b;
    printf("The result is:\n\t%d + %d = %d\n",a,b,res);
    return 0;
}
"

ACTUAL:
C console application. It doesn't display "Enter two digits:" in output until you fill next scanf() with "Debug" configuration, but works well with "Release".

EXPECTED:
First to see ""Enter two digits:" before entering data in "Debug" build.
Comment 1 Sceliphron 2016-12-21 23:55:23 UTC
Created attachment 163288 [details]
IDE log
Comment 2 ilia 2017-04-05 12:12:44 UTC

*** This bug has been marked as a duplicate of bug 165437 ***
Comment 3 ilia 2017-04-05 12:13:59 UTC
Workaround: insert fflush(stdout) or use Cygwin