Meidan Zemer wrote:
Hi,
I have a small C program wich i compile with GNU C Compiler 2.8.1 and 2.7.
and i got the same result in both times.#include <stdlib.h>
#include <stdio.h>
#include <string.h>
main()
{
char str[10];
int num;
scanf("%s",str);
printf("scanf accept %s\n",str);
num=getchar();
printf("getchar accept %c\n",num);
}For some reason "getchat()" accept Null string and do'nt prompt for the user.
I run kernel 2.2.3 on pentium 120 with 32MG
I am sure it is somting simple but i just can'nt see it!!
Does anybody have any idea about it?
Thank you
--
--------------------------
Canaan Surfing Ltd.
Internet Service Providers
Ben-Nes Michael - Manager
Tel: 972-6-6925757
Fax: 972-6-6925858
http://www.canaan.co.il
--------------------------