C语言
文章平均质量分 79
普通网友
这个作者很懒,什么都没留下…
展开
-
C语言2(程序结构)
C语言2(程序结构)#pragma mark-printf// int a = 10;// int b = 20;// printf("a = %d,b = %d\n",a,b);// // double a1 = 3.22;// float b1 = 3.44;// printf("a1 = %lf,b1 = %f\n",a1,b1);#pragma原创 2016-05-03 19:34:56 · 239 阅读 · 0 评论 -
c语言1(基础)
c语言1//#include,#import,@class," ",/*#include:重复编译#import:防止重复编译@class:告诉编译器导入的这个是个类名“”:导入的是自定义的文件*/#pragma mark - 注释//单行注释:可以嵌套,不可以折行/*多行注释:可以折行,不可以嵌套*/#pragma mark -原创 2016-05-03 19:27:11 · 298 阅读 · 0 评论 -
C语言3(复杂程序结构)
C语言3(复杂程序结构)添加头文件#include#pragma mark - 简单语句的嵌套// int a = 10;// {// int b= 3;// int c = 6;// a = 40;// }//printf("c = %d\n",c);#pragma mark - if// int a = 4;// int b = 8;原创 2016-05-04 13:58:01 · 1268 阅读 · 0 评论 -
C语言4(数组)
C语言4(数组)添加头文件#include //#pragma mark - 一维数组// 存储同种数据类型// 数组定义的格式:数据类型 数组名[元素个数]// // // int age[5] = {19,27,44,66,88};// printf("%p\n",age);// printf("%p\n",&age[0]);// for (in原创 2016-05-04 14:04:01 · 430 阅读 · 0 评论 -
C语言5(函数)
C语言5(函数)#pragma mark - 定义函数//调用函数//无返回值,无参数// greeting();// greeting();// greeting();// greeting();//无返回值,有一个参数// sumOfNumber(100);//有返回值,有一个参数int a = 0;printf("inp原创 2016-05-04 14:32:36 · 373 阅读 · 0 评论 -
C语言6(指针)
C语言6(指针)#include #include void exchange1(int a){ a = 10;}void exchange(int *a){ *a = 10;}void exchangeOfPosition(int *a, int *b){ int temp =原创 2016-05-04 14:56:12 · 291 阅读 · 0 评论 -
C语言(链表)
C语言(链表)#include #include typedef struct _Student{int number;//数据域struct _Student *next;//指针域}Student;int main(int argc, const char * argv[]) {//数据结构:计算机存储和组织数据的一种方式//常用原创 2016-05-04 15:15:21 · 456 阅读 · 0 评论 -
C语言(算法)
C语言(算法)#include typedef enum _Workday{monday,tuesday,wednesday,thurday,friday} Workday;typedef struct _Student{int number;char *name;} Student;struct Stud原创 2016-05-04 15:03:13 · 208 阅读 · 0 评论 -
C语言(结构体)
C语言(结构体)#include #include "Coustom.h"int main(int argc, const char * argv[]) {#pragma mark -- 1、有3个学生,定义一个结构体包含每个学生信息(编号、姓名、性别、分数),借助条件表达式,编程找出分数最高者;// typedef struct Student {// int c原创 2016-05-04 16:12:58 · 258 阅读 · 0 评论