易截截图软件、单文件、免安装、纯绿色、仅160KB

C程序设计语言习题5-1,运行时出现段错误,求解

源代码如下:
#include <ctype.h>
#include <stdio.h>

#define BUFSIZE 100

int  getch(void);
void ungetch(int);

/* getint:  get next integer from input into *pn */
int getint(int *pn)
{
    int c, sign, sawsign;

    while (isspace(c = getch()))  /* skip white space */
                                            ;
    if (!isdigit(c) && c != EOF && c != '+' && c != '-') {
        ungetch(c);    /* it's not a number */
        return 0;
            }

    sign = (c == '-') ? -1 : 1;
    if (sawsign = (c == '+' || c == '-'))
        c = getch();
    if (!isdigit(c)) {
        ungetch(c);
        if (sawsign)
            ungetch((sign == -1) ? '-' : '+');
        return 0;
              }

    for (*pn = 0; isdigit(c); c = getch())
   


相关问答:

c基础

#include <string.h>
#include <stdio.h>

void main()
{
int i;
char buf[]="abcde";
strncpy(buf,"abc",3);
for(i=0;i <5;i++)
printf(&q ......

eclipse3.5+cdt编译c有问题

编译普通的c没问题啊,但编译javah生成的就报错:
gcc -O0 -g3 -Wall -c -fmessage-length=0 -oHelloWorld.o ..\HelloWorld.c
gcc -otest.exe HelloWorld.o
d:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../. ......

关于the c program 的一道题!

编写程序detab, 将输入中的制表符替换成适当数目的空格,使空格充满到下一个制表符终止的地方。假设制表符终止位的位置是固定的,比如每隔n列就会出现一个制表符终止位。
------------------- ......

能用C/C++简单实现五子棋程序吗?

最近突然想自己来实现一个五子棋程序,但不知道怎么开始,自己也没学画图形函数,能在控制台下直接写吗>>>?????
控制台?比图形界面更麻烦。
http://search.download.csdn.net/search/%E4%BA%94%E5%AD%90% ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号