C程序员的情书
#include <stdio.h>
#include <string.h>
int
main(void)
{
char str[] =
"3BVPSq4xF.K?=u#,"
"G'K<MrDnRr7gH%#,"
"XKf<f%G`w^=?C<#,"
"HgU_AnNR?*PDQU#,"
"1HRmK+7IO2O`Rd#,"
"A,V&M,Jw>!;6P@#,"
"3AScBdQcN41HDc!#";
int i, len;
len = strlen(str);
for (i = 0; i < len; ++i) {
printf("%c", str[i] | 0x80);
if ((i + 1) % 16 == 0)
putchar('\n');
}
putchar('\n');
for (i = 0; i < 7; i++)
printf("%c%c", str[i * 18] | 0x80, str[i * 18 + 1] | 0x80);
putchar('\n');
return 0;
}
转自:
http://topic.csdn.net/u/20100522/10/60b4502c-121a-4d95-96f9-0acf69e9add1.html
相关文档:
由于要测系统的CPU属性,需要独立编译应用程序,便试了下编译纯C 程序,测试通过。
CC := $(NDK_BASE)/toolchain/arm-eabi/bin/arm-eabi-gcc
AR := $(NDK_BASE)/toolchain/arm-eabi/bin/arm-eabi-ar
INC & ......
1、快速初始化
char *str = new [size];
str[0]='\0';
2、memcpy的妙用
试题6:已知WAV文件格式如下表,打开一个WAV文件,以适当的数据结构组织WAV文件头并解析WAV格式的各项信息。
WAVE文件格式说明表
偏移地址 字节数 数据类型 内 容
文件头
00H 4 Char "RIFF"标志
......
#include<windows.h>
void Birthday();
int main()
{
Birthday();
return 0;
}
void Birthday()
{
unsigned frequency[]={392,392,440,392,523,494,
392,392,440,392,587,523,
......
#include <stdio.h>
#include <string.h>
int
main(void)
{
char str[] =
"3BVPSq4xF.K?=u#,"
"G'K<MrDnRr7gH%#,"
"XKf<f%G`w^=?C<#,"
"HgU_AnNR?*PDQU#,"
......