随笔分类 -  C

摘要:.版本 2.支持库 iext 拖入的文件 = 到文本 (读入文件 (接收到的文件路径)) firest = 分割文本 (拖入的文件, #换行符, ) .计次循环首 (取数组成员数 (firest), i) 索引 = 超级列表框1.插入表项 (, , , , , ) secound = 分割文本 (f 阅读全文
posted @ 2025-03-09 21:27 稳稳稳稳稳稳 阅读(60) 评论(0) 推荐(0)
摘要://利用结构体表示:年月日#includeint main(){ //1. 定义结构体变量。不会分配存储空间 struct Date { //按顺序分配 int year; int month; int day; ... 阅读全文
posted @ 2015-03-12 21:26 稳稳稳稳稳稳 阅读(218) 评论(0) 推荐(0)
摘要://结构体的基本使用 #includeint main(){ //1. 定义结构体类型 struct Person {//里面的是哪个变量,是结构体成员或实行 int age; double height; char *name; ... 阅读全文
posted @ 2015-03-12 18:11 稳稳稳稳稳稳 阅读(246) 评论(0) 推荐(0)
摘要:#include int main(int argc, char *argv[]){ //定义指针变量指向sum函数 int(*P)(int , int );//没必要写清楚,可以省略 p=sum;//函数名就是 int c = p(10,11); int c ... 阅读全文
posted @ 2015-03-11 17:57 稳稳稳稳稳稳 阅读(145) 评论(0) 推荐(0)
摘要:/*1. 看懂语法2. 定义指向函数的指针: double(*p)(double,char *,int); p = haha; or double (*p)(double,char *,int)=haha;3.如何间接调用函数 1. p(19.7,"jack",10);... 阅读全文
posted @ 2015-03-11 17:56 稳稳稳稳稳稳 阅读(189) 评论(0) 推荐(0)
摘要:补充第一点://定义字符串数组//定义字符串数组#include int main(int argc, char *argv[]){ int ages[5];//整型数组 char *name[5];//指针数组 char *name[5]={"jack","rose"... 阅读全文
posted @ 2015-03-09 17:20 稳稳稳稳稳稳 阅读(168) 评论(0) 推荐(0)
摘要://指针和数组之间的关系 #include int main(int argc, char *argv[]){ char name[]="it";//重要 name[0]='T';//字符串变量。放在栈里面,可以随便改 printf("%s\n", name);//这个时候输出... 阅读全文
posted @ 2015-03-09 16:38 稳稳稳稳稳稳 阅读(232) 评论(0) 推荐(0)
摘要:#include/*int main(){ int i = 0; int ages[5]={10,9,8,67,56}; for(i = 0; ivoid change(int array[]);int main(){ int ages[5]={ 5,6,7,8... 阅读全文
posted @ 2015-03-09 15:52 稳稳稳稳稳稳 阅读(198) 评论(0) 推荐(0)
摘要://形参改变实参#includevoid change(int *n);int main(){ int a = 90; change(&a); printf("%d\n",a); return 0;}void change(int *n){ *n = 10;} 阅读全文
posted @ 2015-03-07 21:19 稳稳稳稳稳稳 阅读(348) 评论(0) 推荐(0)
摘要:#includeint sumAndminus(int n1, int n2, int *n3);int main(){ int a = 10; int b = 7; int he; int cha; he = sumAndminus(a,b,&cha); pri... 阅读全文
posted @ 2015-03-06 21:20 稳稳稳稳稳稳 阅读(666) 评论(0) 推荐(0)
摘要:Exercise 6-1. write a program that will prompt for and read a positive integer less than1,000 from the keyboard, and then create and output a string t... 阅读全文
posted @ 2014-12-28 22:49 稳稳稳稳稳稳 阅读(291) 评论(0) 推荐(0)
摘要:从输出结果来看,这个程序是错的。完全不知道什么意思。Exercise 5-5. Write a program that will calculate the average grade for the students ineach of an arbitrary number of classe... 阅读全文
posted @ 2014-12-28 19:14 稳稳稳稳稳稳 阅读(321) 评论(0) 推荐(0)
摘要:Exercise 5-4. Define a two-dimensional array, data[11][5] , of type double. Initializethe elements in the first column with values from 2.0 to 3.0 inc... 阅读全文
posted @ 2014-12-28 18:30 稳稳稳稳稳稳 阅读(262) 评论(0) 推荐(0)
摘要:Exercise 5-3. Write a program that will read five values from the keyboard and storethem in an array of type float with the name amounts. Create two a... 阅读全文
posted @ 2014-12-27 16:52 稳稳稳稳稳稳 阅读(226) 评论(0) 推荐(0)
摘要:Exercise 5-2. Define an array, data, with 100 elements of type double. Write a loop thatwill store the following sequence of values in corresponding e... 阅读全文
posted @ 2014-12-19 12:13 稳稳稳稳稳稳 阅读(228) 评论(0) 推荐(0)
摘要:Exercise 5-1. Write a program that will read five values of type double from the keyboardand store them in an array. Calculate the reciprocal of each ... 阅读全文
posted @ 2014-12-18 19:19 稳稳稳稳稳稳 阅读(479) 评论(1) 推荐(0)
摘要:Recommendation:Exercise 4-1. Write a program that will generate a multiplication table of a size entered by the user. a table of size 4, for instance,... 阅读全文
posted @ 2014-12-18 18:49 稳稳稳稳稳稳 阅读(505) 评论(0) 推荐(0)
摘要:1. 取模运算时,将两个数字从double 转换为long,因为c语言中%运算只能用于整数。 阅读全文
posted @ 2014-12-18 11:58 稳稳稳稳稳稳 阅读(332) 评论(1) 推荐(0)
摘要:Exercise 3-3. Write a program that will calculate the price for a quantity entered from the keyboard, given that the unit price is $5 and there is a d... 阅读全文
posted @ 2014-12-17 22:17 稳稳稳稳稳稳 阅读(537) 评论(1) 推荐(0)
摘要:无法让我不汗颜:Exercise 3-2. Write a program that prompts the user to enter the date as three integer values for the month, the day in the month, and the yea... 阅读全文
posted @ 2014-12-17 19:15 稳稳稳稳稳稳 阅读(694) 评论(0) 推荐(0)