易截截图软件、单文件、免安装、纯绿色、仅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写DLL文件C、PB能调用VB不能调用

为什么C写的DLL文件C、PB能调用VB不能调用?
VB里为什么有的DLL直接通过引用可以使用?有的需要通过declare申明外部函数?这些DLL有什么差别?

1、为什么PB能通过DECLARE声明而VB不行?
2、如果这个dll中的 ......

菜鸟求解:c图形问题

#include <stdio.h>
#include <graphics.h>
void main()
{
  int x0,y0,x1,y1,driver,mode,i;
  driver=VGA;
  mode=VGAHI;
  initgraph(&driver,&mode,&qu ......

c/c++每条指令和函数的执行时间是多少?

想知道每条指令或函数的系统消耗。比如系统执行int a=0;的开销是多少。有没有类似的文档之类的。不要和我说用什么clock()函数来测试。我想要相关总结好的文档
先反汇编,然后拿着cpu的指令手册查每条指令的时间周期 ......

请教C基本的问题

int a ,b ,c ;
scanf("%c\n",&a);
scanf("%c\n",&b);
scanf("%c",&c);          //和下面一行有什么区别?
//scanf("%c ......

求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号