
C编程语言
文章平均质量分 71
春暖之花开
这个作者很懒,什么都没留下…
展开
-
学生信息管理系统
Student.h #ifndef QY_STUDENT_H#define QY_STUDENT_H #define NAMELEN 32#define MINAGE 4#define MAXAGE 100#define MINSTUDYID 20140001#define MAXSTUDYID 20149999 typedef原创 2014-10-06 13:18:21 · 763 阅读 · 0 评论 -
判断机器是大端小端
#include #include #if 0bool isBigEndian(void){ int var = 0x12345678; char *p = (char *)&var; return *p == 0x12;}#endif#if 0bool isLittleEndian(void){ int var原创 2014-10-23 20:48:51 · 834 阅读 · 0 评论 -
C语言总结
变量变量的名字:标识符 1、变量的名字必须以大写字母、小写字母或者下划线开始 2、变量的其他部分必须是大写字母、小写字母、数字或者下划线组成 3、变量不能由空格、&、*组成,不能使用C程序关键字集合变量命名的习惯:驼峰命名法 示例:myVa原创 2014-10-23 20:33:24 · 777 阅读 · 0 评论 -
图形绘制
//// main.c// DrawShape//// Created by qingyun on 14-10-6.// Copyright (c) 2014年 hnqingyun. All rights reserved.//#include #define SHAPENUM 3原创 2014-10-07 20:00:17 · 536 阅读 · 0 评论 -
编写剪刀(scissor)、石头(stone)、布(cloth)游戏
#include #include #include int main(void){ int user = -1; int computer = -1; int result = -1; char gesture[3][16] = {"scissor","stone", "cloth"};#if 0 printf原创 2014-09-30 15:30:19 · 1699 阅读 · 0 评论 -
ios 面试题 - 字符串反转
本文来自 海之飞燕 http://v2it.win/?p=870@implementation NSString (Reverse) - (NSString *)stringByReverse{ NSMutableString *string = [NSMutableString stringWithCapacity:self.length]; for (NSIn...原创 2018-08-03 15:32:05 · 3444 阅读 · 0 评论