c语言中两个小于的作用,c语言中两个大于号和两个小于号的意思 还有strtol函数 和itoa函数的意思...

<<4 二进制左移4位,也就是*16

如:

int x = 10;

int y = x << 4;

printf( "%d", y );

输出160 ;

那么上面就是如果xx[i][j]的值*16后大于32而且小于或等于100的话,就执行下面的语句

itoa函数

是int 转string类型的一个函数 msdn上是这么写的

_itoa, _i64toa, _ui64toa, _itow, _i64tow, _ui64tow

Convert an integer to a string.

char *_itoa( int value, char *string, int radix );

char *_i64toa( __int64 value, char *string, int radix );

char * _ui64toa( unsigned _int64 value, char *string, int radix );

wchar_t * _itow( int value, wchar_t *string, int radix );

wchar_t * _i64tow( __int64 value, wchar_t *string, int radix );

wchar_t * _ui64tow( unsigned __int64 value, wchar_t *string, int radix );

Routine Required Header Compatibility

_itoa Win 95, Win NT

_i64toa Win 95, Win NT

_ui64toa Win 95, Win NT

_itow Win 95, Win NT

_i64tow Win 95, Win NT

_ui64tow Win 95, Win NT

For additional compatibility information, see Compatibility in the Introduction.

Libraries

LIBC.LIB Single thread static library, retail version

LIBCMT.LIB Multithread static library, retail version

MSVCRT.LIB Import library for MSVCRT.DLL, retail version

Return Value

Each of these functions returns a pointer to string. There is no error return.

Parameters

value

Number to be converted

string

String result

radix

Base of value; must be in the range 2 – 36

Remarks

The _itoa, _i64toa, and _ui64toa function convert the digits of the given value argument to a null-terminated character string and stores the result (up to 33 bytes) in string. If radix equals 10 and value is negative, the first character of the stored string is the minus sign ( – ). _itow, _i64tow, and _ui64tow are wide-character versions of _itoa, _i64toa, and _ui64toa respectively.

Generic-Text Routine Mappings

TCHAR.H Routine _UNICODE & _MBCS Not Defined _MBCS Defined _UNICODE Defined

_itot _itoa _itoa _itow

Example

/* ITOA.C: This program converts integers of various

* sizes to strings in various radixes.

*/

#include

#include

void main( void )

{

char buffer[20];

int i = 3445;

long l = -344115L;

unsigned long ul = 1234567890UL;

_itoa( i, buffer, 10 );

printf( "String of integer %d (radix 10): %s\n", i, buffer );

_itoa( i, buffer, 16 );

printf( "String of integer %d (radix 16): 0x%s\n", i, buffer );

_itoa( i, buffer, 2 );

printf( "String of integer %d (radix 2): %s\n", i, buffer );

_ltoa( l, buffer, 16 );

printf( "String of long int %ld (radix 16): 0x%s\n", l,

buffer );

_ultoa( ul, buffer, 16 );

printf( "String of unsigned long %lu (radix 16): 0x%s\n", ul,

buffer );

}

Output

String of integer 3445 (radix 10): 3445

String of integer 3445 (radix 16): 0xd75

String of integer 3445 (radix 2): 110101110101

String of long int -344115 (radix 16): 0xfffabfcd

String of unsigned long 1234567890 (radix 16): 0x499602d2

Data Conversion Routines

See Also _ltoa, _ultoa

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值