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

新手提问关于字符串输出的问题(c primer的编程题)

下面的代码哪里错了?编译器不报错,选择菜单时出错

C/C++ code:
#include<stdio.h>
#include<ctype.h>
void strput(char *str[],int n);//输出初始字符串列表
void strasc(char *str[],int n);//按ascii码输出字符串
void strlong(char *str[],int n);//按长度递增顺序输出字符串
void strslg(char *str[],int n);//按第一个单词长度输出字符串
int main(void)
{
const int LIM=10;
const int SIZE=81;
char input[LIM][SIZE];
char *ptstr[LIM];
int i=0;
char ch;
printf("请输入10个字符串\n");
while(i<LIM &&gets(input[LIM])!=NULL && input[LIM][0]!='\0')
{
ptstr[i]=input[i];
i++;
}
while(1)
{
printf("***********************************************************\n");
printf("请输入你要的选择\n");
printf("1)输出初始字符串列表 2)按ascii码输出字符串\n");
printf("3)按长度递增顺序输出字符串 4)按第一个单词长度输出字符串\n");
printf("5)退出\n");
printf("***********************************************************\n");
while((ch==getchar())!='\n');
{
switch(ch)
{
case '1':
strput(ptstr,i);
break;
case '2':
strasc(ptstr,i);


相关问答:

为什么C写DLL文件C、PB能调用VB不能调用

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

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

C\C++如何计算函数的导数

C\C++如何计算函数的导数,本人新手,想写个程序,但是不知道如何下手,还望高手指点一二,谢过。
这个……

跟函数的具体形式有关吧,难道你想编出个“万能”的求导函数?

俺上学时想过自动推导公式,后来 ......

C中的一些小问题。。。

/* Note:Your choice is C IDE

作用: 随机数加密法,,,,
以下有许多不懂,请教一下,请主意代码;
*/
#include <stdio.h>
#include <stdlib.h>
union
{
int value;
struct
{
c ......

C、C++、VC++ 精品电子书发布啦!

内容涉及:C、C++、STL、VC++、MFC、COM、ATL、Windows网络编程、数据库编程、Windows驱动编程、软件工程、Windows操作系统编程,等等方面。

下载地址:http://www.cctry.com/forumdisplay.php?fid=46

......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号