Hi ,
in my indigo eclipse cdt the output of the following code comes out like this -
russel
Enter boyfriend's name:
Dear russel.
You're history.
#include <stdio.h>
#include <stdlib.h>
int main() {
char ex[20];
puts("Enter boyfriend's name:");
scanf("%s", ex);
printf("Dear %s.\n\n\tYou're history.\n", ex);
return 0;
}
But in cygwin it is correct like this -
adnan@adnan-PC /cygdrive/e
$ gcc test.c -o test
adnan@adnan-PC /cygdrive/e
$ ./test
Enter boyfriend's name:
Russel
Dear Russel.
You're history.
adnan@adnan-PC /cygdrive/e
$
Please somebody advise, I am new to eclipse cdt.
Thanks in advance
Adnan
[Updated on: Wed, 06 June 2012 01:59]
Report message to a moderator