码迷,mamicode.com
首页 >  
搜索关键字:c++ memset    ( 3691个结果
12个C语言面试题,涉及指针、进程、运算、结构体、函数、内存,看看你能做出几个!
? 12个C语言面试题,涉及指针、进程、运算、结构体、函数、内存,看看你能做出几个! 1.gets()函数 问:请找出下面代码里的问题: #include<stdio.h> int main(void) { ??? char buff[10]; ??? memset(buf...
分类:编程语言   时间:2015-06-30 13:18:57    阅读次数:150
12个C语言面试题,涉及指针、进程、运算、结构体、函数、内存,看看你能做出几个!
1.gets()函数问:请找出下面代码里的问题:#includeint main(void){ char buff[10]; memset(buff,0,sizeof(buff)); gets(buff); printf("\n The buffer entered is [%s]\n",buff)...
分类:编程语言   时间:2015-06-30 12:11:57    阅读次数:145
UVa1339 Ancient Cipher
#include #include #include // for memset#include using namespace std;int main(){ int ce[26], co[26]; string encrypted, orginal; string::size_type i, ....
分类:其他好文   时间:2015-06-27 15:57:06    阅读次数:106
LeetCode Count Primes 求素数个数
题意:给一个数n,返回小于n的素数个数。思路: 1 class Solution { 2 public: 3 int countPrimes(int n) { 4 bool* isPrime =new bool[n] ; 5 6 memset...
分类:其他好文   时间:2015-06-26 22:19:55    阅读次数:123
mmset
memset是计算机中C/C++语言函数。将s所指向的某一块内存中的前n个 字节的内容全部设置为ch指定的ASCII值, 块的大小由第三个参数指定,这个函数通常为新申请的内存做初始化工作, 其返回值为指向s的指针。  void *memset(void *s, int ch, size_t n); 函数解释:将s中前n个字节 (typedef unsigned int size_t )用 ...
分类:其他好文   时间:2015-06-25 09:04:32    阅读次数:151
KMP算法
算法模板//Author LJH//www.cnblogs.com/tenlee#include #include #include #include #include #include #include #include #include #define clc(a, b) memset(a, b...
分类:编程语言   时间:2015-06-22 19:12:22    阅读次数:139
poj 1868 Antiarithmetic? 判断序列中是否有等差子序列
#include using namespace std; const int maxN=10024; int n,vis[maxN],a[maxN]; bool find() { memset(vis,-1,sizeof(vis)); for(int i=0;i<n;++i){ for(int j=0;j=0...
分类:其他好文   时间:2015-06-22 17:56:53    阅读次数:110
sprintf、atoi、strlen、strcat、memset、sizeof的一些用法总结
一、sprintf的用法 // 将字符串存入arr数组     sprintf(arr, "%s", "abc");  // 将整数转换为字符串存入arr数组 sprintf(arr, "%d", 123);  二、atoi的用法 // 将字符串转换为整数 a = atoi("1243"); 三、strlen的用法 1、strlen 字符串的结...
分类:其他好文   时间:2015-06-21 02:08:23    阅读次数:131
UVa1225 Digit Counting
#include #include int main(){ int T, N, i, j; int a[10]; scanf("%d", &T); while (T--) { memset(a, 0, sizeof(a)); scanf("%d", &N); for (i = 1; i 0)...
分类:其他好文   时间:2015-06-21 00:47:44    阅读次数:153
C#调用dll
#include #include extern "C" __declspec(dllexport)int TCharParm(char* in,int len,char* out){ memset(out,0,4); memcpy(out,in,len); return 0;}extern "C"...
分类:Windows程序   时间:2015-06-18 14:55:50    阅读次数:139
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!