![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
c++
文章平均质量分 68
KevinChen0808
这个作者很懒,什么都没留下…
展开
-
c++试题
年初又是一个跳槽的高峰期,多少程序员满怀希望的去面试,却往往失足于一些细节,今贴出一些c++经典试题,希望对大家有所帮助。 找错题 试题1:void test1(){ char string[10]; char* str1 = "0123456789"; strcpy( string, str1 );} 试题2:void test2(){ char string[10], str1原创 2008-02-19 09:51:00 · 482 阅读 · 0 评论 -
计算一个字符的二进制表示中有几个1
#include void ch2binary( char v ){ int nBits; int i; int numOfOne = 0; nBits = sizeof( char ) << 3; //计算有多少位 for( i = nBits - 1; i >= 0; i -- ) {原创 2008-06-18 15:39:00 · 902 阅读 · 0 评论 -
atoi和itoa的实现
#include int str2num(const char *s){ int i; char c; for (i = 0; 0 <= (c = *s) && c <= 9; ++s) i = i*10 + c - 0; return i;}d原创 2008-06-19 09:45:00 · 717 阅读 · 0 评论