c语言里所有以#开头的都是预编译指令,就是在正式编译之前,让编译器做一些预处理的工作。
#ifdef DEBUG printf("variable x has value = %d\n",x);
#endif#if和#endif是配对的,叫做条件编译指令,如果满足#if后面的条件,就编译#if和#....
分类:
其他好文 时间:
2014-05-22 04:37:10
阅读次数:
251
RCC CSR寄存器会存储复位标示,可通过它来知道复位原因,来源: 1
if(RCC_GetFlagStatus(RCC_FLAG_PINRST)) 2 printf("PINRST\r\n"); 3
if(RCC_GetFlagStatus(RCC_FLAG_PORR...
分类:
其他好文 时间:
2014-05-22 03:16:49
阅读次数:
3604
一、三道考题开讲之前,我先请你做三道题目。(嘿嘿,得先把你的头脑搞昏才行……唉呀,谁扔我鸡蛋?)考题一,程序代码如下:void Exchg1(int x,
int y){ int tmp; tmp = x; x = y; y = tmp; printf("x = %d, y = %d\n", x, ...
分类:
编程语言 时间:
2014-05-22 02:09:24
阅读次数:
213
#include "stdafx.h"#include using namespace
std;int main(){ char c,d,e,f; printf("please input two characters:\n");
c=getchar(); putchar...
分类:
其他好文 时间:
2014-05-21 23:46:19
阅读次数:
352
输出字符串:
puts()函数:
puts()函数只接受一个参数(指向要显示的字符串的指针)。由于字面字符串是一个指向字符串的指针,因此
puts()可用于显示字面字符串和字符串变量。
puts()显示完字符串后,自动换行。
puts()是一个标准的输出函数,需要包含stdio.h。
printf()函数:
printf()函数是库函数,可用于显示字符串,使用转换...
分类:
编程语言 时间:
2014-05-21 16:53:00
阅读次数:
299
本文参考《Android系统源代码情景分析》,作者罗升阳
一、测试代码:
~/Android/external/binder/server
----FregServer.cpp
~/Android/external/binder/common
----IFregService.cpp...
分类:
移动开发 时间:
2014-05-21 14:47:24
阅读次数:
358
Tour
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 3470
Accepted: 1545
Description
John Doe, a skilled pilot, enjoys traveling. While on vacation, he rents a...
分类:
其他好文 时间:
2014-05-21 08:24:18
阅读次数:
354
#define LOCAL#include#includeconst int
MAX_N=100;int a[MAX_N],b[MAX_N];void init(){ for(int i=0;i=1) {
if(b[sum-1]<10) printf(...
分类:
其他好文 时间:
2014-05-21 04:53:29
阅读次数:
175
编程题:输入一串字符,程序会自动将大写字母转换为小写#include<stdio.h>#include<conio.h>main(){ inti=0; chara[50],ch; printf("输入一串字符,程序会自动将大写字母转换为小写\n"); printf("按任意键继续,按Esc键退出\n"); while(ch=getch()!=27) { fflush(..
分类:
其他好文 时间:
2014-05-21 02:46:26
阅读次数:
277
编程题:输入一个数字,实现逆排功能。#include<stdio.h>#include<conio.h>fun(intm,char*s){charc;intk,i=10;while(m!=0){k=m%i;*s=k+‘0‘;s++;m=(m-k)/i;}*s=‘\0‘;}main(){intn;chars[81],*p;p=s;printf("enteranumber(>100):");scanf("%d",&n);fun(n,s);p..
分类:
其他好文 时间:
2014-05-20 17:59:19
阅读次数:
232