码迷,mamicode.com
首页 >  
搜索关键字:unsigned    ( 4409个结果)
C/C++ 各种基本数据类型 详细说明
C/C++ 各种基本数据类型 详细说明...
分类:编程语言   时间:2015-07-22 16:21:06    阅读次数:148
温故知新,基础复习(快速排序及优化)
温故知新,基础复习(快速排序及优化)使用了三值取中和插排优化#include #define InsertSortNumber 10 void InsertSort(int Arra[],unsigned int LowIndex,unsigned int HighIndex) { printf("low=%d,high=%d\n",LowIndex,HighIndex); for (un...
分类:编程语言   时间:2015-07-22 00:06:27    阅读次数:183
温故知新,基础复习(二叉堆排序)
温故知新,基础复习(二叉堆排序)最小堆(最终数组的数据是降序),最大堆(最终数组的数据是升序)下例是最小堆#include #include void Swap(int Arra[],unsigned int LeftIndex,unsigned int RightIndex) { int TeampValue = Arra[LeftIndex]; Arra[LeftIndex]=Arr...
分类:编程语言   时间:2015-07-22 00:04:42    阅读次数:167
Sizeof与Strlen的区别与联系(转)
一、sizeof sizeof(...)是运算符,在头文件中typedef为unsigned int,其值在编译时即计算好了,参数可以是数组、指针、类型、对象、函数等。它的功能是:获得保证能容纳实现所建立的最大对象的字节大小。由于在编译时计算,因此sizeof不能用来返回动态分配的内存空间的大小。实...
分类:其他好文   时间:2015-07-21 21:54:08    阅读次数:104
Linux内核中大小端判定宏
#include static union{ char c[4];unsigned long mylong;} endian_test = { {'l','?','?','b'} };#define ENDIANNESS ( (char) endian_test.mylong )int main(....
分类:系统相关   时间:2015-07-21 10:21:49    阅读次数:142
【整理】--分配设备号register_chrdev_region()、alloc_chrdev_region() 和 register_chrdev()
(1)分配设备编号,注册设备与注销设备的函数均在fs.h中声明,如下:extern int register_chrdev_region(dev_t,unsigned int,const char*);表示静态的申请和注册设备号extern int alloc_chrdev_region(dev_t...
分类:其他好文   时间:2015-07-21 01:03:55    阅读次数:187
两表合并查询
UNIONUNION ALL//Table AttributeCreate table student( id int unsigned not null auto_increment, name varchar(20) not null, primary key(id))ENGINE=I...
分类:其他好文   时间:2015-07-20 19:25:37    阅读次数:125
win32中GBK、UTF8的互转
#include "stdafx.h"#include #include //GBK编码转换到UTF8编码int GBKToUTF8(unsigned char * lpGBKStr,unsigned char * lpUTF8Str,int nUTF8StrLen){wchar_t * lpUni...
分类:Windows程序   时间:2015-07-20 18:24:10    阅读次数:133
HDOJ_1001
#includeint main(void){unsigned n;while(scanf("%d", &n) != EOF){printf("%d\n\n", (1+n)*n/2);}return 0;}n+1可能出现溢出情况,所以需要将n的数据类型改为unsigned
分类:其他好文   时间:2015-07-20 12:48:01    阅读次数:107
LeeCode-Number of 1 Bits
Write a function that takes an unsigned integer and returns the number of ’1' bits it hasFor example, the 32-bit integer ’11' has binary representatio...
分类:其他好文   时间:2015-07-20 10:29:37    阅读次数:104
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!