C¶ÓÁÐ Êä³öÑî»ÔÈý½Ç
Ò²ÊÇÖÐÈí±ÊÊÔµÄËã·¨Ì⣬µ±Ê±²¢²»ÖªµÀ½ÐÑî»ÔÈý½Ç£¬°¦¡£NÄê²»ÓÃÁË£¬»¹µÃÔÙʰÆð£¬ÎªÁËÄǸöÃΡ£
#include <stdio.h>
void main()
{
int a[50][50];
int i,j,n;
printf("Please input Number:");
scanf("%d",&n);
for (i=0;i<n;i++)
{
for (j=0;j<=i;j++)
{
if (j==0 ||j==i)
a[i][j]=1;
else
a[i][j]=a[i-1][j-1]+a[i-1][j];
printf("%5d",a[i][j]);
}
printf("\n");
}
getch();
}
/*TC 2.0²âÊÔ*/
#define size 100
#define true 1
#define false 0
typedef int elemtype;
typedef struct queue
{
elemtype element[size];
int front;
int rear;}queue;/*jie gou ti*/
void initqueue(queue*q)
{
q->front=q->rear=0;}/*chu shi hua*/
int enqueue(queue*q,int x)
{
if((q->rear+1)%size==q->front)
return(false);
q->element[q->rear]=x;
q->rear=(q->rear+1)%size;
&nb
Ïà¹ØÎĵµ£º
[root@localhost test]# hexdump -s 0 -n 52 -C helloworld
00000000 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 |.ELF............|
00000010 02 00 03 00 01 00 00 00 10 83 04 08 34 00 00 00 |............4...|
00000020 30 08 00 00 00 00 00 00 34 00 20 ......
GCC ±àÒëc³ÌÐòµÄ·½·¨¼°¹ý³Ì½âÎö
Justin.zp.Yang 2010.04.10
Ŀǰ Linux ÏÂ×î³£ÓÃµÄ C ÓïÑÔ±àÒëÆ÷ÊÇ GCC £¨ GNU Compiler Collection £©£¬ËüÊÇ GNU ÏîÄ¿ÖзûºÏ ANSI C ±ê×¼µÄ±àÒëϵͳ£¬Äܹ»±àÒëÓà C ¡¢ C++ ºÍ Object C µÈÓïÑÔ±àдµÄ³ÌÐò¡£ GCC ²»½ö¹¦Äܷdz£Ç¿´ó£¬½á¹¹ ......
×¢ÒâÖ»Äܵ½2049Ä꣡
#define uchar unsigned char
#define uint unsigned int
#include <intrins.h>
/*
¹«ÀúÄê¶ÔÓ¦µÄÅ©ÀúÊý¾Ý,ÿÄêÈý×Ö½Ú,
¸ñʽµÚÒ»×Ö½ÚBIT7-4 λ±íʾÈòÔÂÔ·Ý,ֵΪ0 ΪÎÞÈòÔÂ,BIT3-0 ¶ÔӦũÀúµÚ1-4 ÔµĴóС
µÚ¶þ×Ö½ÚBIT7-0 ¶ÔӦũÀúµÚ5-12 Ô´óС,µÚÈý×Ö½ÚBIT7 ±íʾũÀúµÚ13 ¸öÔ´óÐ ......
1¡¢Ñ¡ÔñºÏÊʵÄËã·¨ºÍÊý¾Ý½á¹¹
Ñ¡ÔñÒ»ÖÖºÏÊʵÄÊý¾Ý½á¹¹ºÜÖØÒª£¬Èç¹ûÔÚÒ»¶ÑËæ»ú´æ·ÅµÄÊýÖÐʹÓÃÁË´óÁ¿µÄ²åÈëºÍɾ³ýÖ¸ÁÄÇʹÓÃÁ´±íÒª¿ìµÃ¶à¡£Êý×éÓëÖ¸ÕëÓï¾ä¾ßÓÐÊ®·ÖÃÜÇеĹØÏµ£¬Ò»°ãÀ´Ëµ£¬Ö¸Õë±È½ÏÁé»î¼ò½à£¬¶øÊý×éÔò±È½ÏÖ±¹Û£¬ÈÝÒ×Àí½â¡£¶ÔÓڴ󲿷ֵıàÒëÆ÷£¬Ê¹ÓÃÖ¸Õë±ÈʹÓÃÊý×éÉú³ÉµÄ´úÂë¸ü¶Ì£¬Ö´ÐÐЧÂʸü¸ß¡£
ÔÚÐí¶à ......
C++µÄʵÏÖ
#include<fstream>
#include <iostream>
using namespace std;
int main()
{
ofstream logTest("foo.log");
streambuf *oldbuf = cout.rdbuf(logTest.rdbuf());
cout << "Êä³ö ......