0

This is my first time with Eclipse C/C++. I installed it 2 days ago and still trying to figure it out, by writing simple C Programs.

Here are 2 snapshots of the IDE:

  1. Code Screenshot :

enter image description here

  1. Console Screenshot :

enter image description here

My questions are :

  1. No Command Prompt pop on executing the code. Every output is displayed in its console view(If its a feature of the IDE that is another thing).

  2. When I executed the code in the screenshot 1, I was expecting the following:

First Number : //this should be displayed & then I enter 5 Second number : //after hitting ENTER, I press 6 in this line

Result :         //after hitting ENTER, these 2 lines must be displayed
5 + 6 = 11

But on executing the source code, the console view of the IDE is clean & clear with nothing written on it. I entered the numbers as shown in the 2nd Screenshot, and than the rest of the string is displayed.

Why is it happening? Am I missing any type of settings or is it the way Eclipse C/C++ works.

phougatv
  • 321
  • 1
  • 5
  • 17
  • 2
    try flushing the stream after the printf and before the scanf: `fflush(stdout); ` http://stackoverflow.com/questions/1716296/why-does-printf-not-flush-after-the-call-unless-a-newline-is-in-the-format-strin – bolov Jan 17 '15 at 15:38
  • @bolov Link provided by you was helpful. Thanks. :) – phougatv Jan 17 '15 at 15:51

0 Answers0