易截截图软件、单文件、免安装、纯绿色、仅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())
   


相关问答:

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/C++ code:

#include<stdio.h>
void main()
{
unsigned int v,u;
char c1,c2;
scanf("%o,%o",&u,&v);
scanf("%c,%c",&c1,&c2);
printf( ......

求c伪代码

辅助下单流程:
一、以某一交易品种g的当前成交价P为基础,上、下各拉开一定点数x双向挂单Tb(买单,挂单价格为Bp=P+x)和Ts(卖单,挂单价格为Sp=P- x),数量均为n。同时,仍以P为基础,设定Tb的止损点数Lb=P-y ......

求c伪代码

辅助下单流程:
一、以某一交易品种g的当前成交价P为基础,上、下各拉开一定点数x双向挂单Tb(买单,挂单价格为Bp=P+x)和Ts(卖单,挂单价格为Sp=P- x),数量均为n。同时,仍以P为基础,设定Tb的止损点数Lb=P-y ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号