problem in eclipse [message #1444068] |
Mon, 13 October 2014 15:38 |
Manoj kumar Messages: 1 Registered: October 2014 |
Junior Member |
|
|
i frequently use eclipse to do c programs . but when we use a scanf statement in the program the program wont get terminate,and if we give values before the program get terminate,it is showing the correct output. if we manually terminate the program it is showing garbage values.
example program which wrote using eclipse indigo:
#include <stdio.h>
#include <stdlib.h>
int main(void) {
int a,b,addition;
printf("enter a,b no.s");
scanf("%d%d",&a,&b);
addition=a+b;
printf("add of a,b is %d",addition);
}
output ,giving values before termination:
1 2
enter a,b no.sadd of a,b is 3
output,manually termination:
enter a,b no.sadd of a,b is 2147344440
|
|
|
|
|
Re: problem in eclipse [message #1454800 is a reply to message #1454591] |
Tue, 28 October 2014 19:43 |
Tauno Voipio Messages: 742 Registered: August 2014 |
Senior Member |
|
|
The man pages should be installed along with your C translator and library toolkit.
They are usually accessed from the terminal with
man scanf
Google seems to find pretty well the man pages.
Have you tried to leave the mouse cursor resting on the scanf symbol in your CDT source code editor?
--
Tauno Voipio
|
|
|
Powered by
FUDForum. Page generated in 0.03493 seconds