Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

C/C++ѧϰ±Ê¼Ç[01].×ÝÏò´òÓ¡ÕûÊý

#include <stdio.h>
#include <string.h>
#include <math.h>
#define BASE 10
int intlen(long n);
int main()
{
int i, j, num, sz;
i = j = num = sz = 0;
if (!scanf("%d", &num) || num <= 0) {
printf("invalid input\n");
return 1;
}
sz = intlen(num);
for (i = sz; i > 0; i--) {
for (j = 1; j <= num; j++) {
printf("%d",(j % (int) (pow(BASE,i))) / (int) (pow(BASE,i - 1)));
}
printf("\n");
}
return 0;
}
int intlen(long n)
{
return log10(fabs(n)) + 1;
}
/* vim: set ts=4 sw=4: */

´Ó±ê×¼ÊäÈë½ÓÊÕÒ»¸ö´óÓÚ0µÄÕûÊý,ÊúÏò´òÓ¡1-Õâ¸öÊýÖ®¼äµÄÊý
Óõ½Á˶ÔÊýº¯ÊýÈ¡ÕûÊýµÄλÊý,È¡Ä£ÔËËã,Õû³ýÔËËã,Ö¸ÊýÔËËã


Ïà¹ØÎĵµ£º

the c programming language Ï°Ìâ µÚ¶þÕÂ

exercise2.4
void squeeze(char s[],char t[])
{
int i,j,k;
int lens,lent;
lens=strlen(s);
lent=strlen(t);
for(i=0,k=0;i<lens;i++)
{
for(j=0;j<lent;j++)
if(s[i]==t[j])
break;
if(j==lent)
s[k++]=s[i];
}
s[k]='\0';

exercise2.5
int any(char s[],char t[ ......

C++ÓëJava±È½Ï(ת)


C++ÓëJava±È½Ï(ת)
Ó¢ÎÄÔ­ÎÄ£ºhttp://www.javacoffeebreak.com/articles/thinkinginjava/comparingc++andjava.html
“×÷ΪһÃûC++³ÌÐòÔ±£¬ÎÒÃÇÔçÒÑÕÆÎÕÁËÃæÏò¶ÔÏó³ÌÐòÉè¼ÆµÄ»ù±¾¸ÅÄ¶øÇÒJavaµÄÓï·¨ÎÞÒÉÊǷdz£ÊìϤµÄ¡£ÊÂʵÉÏ£¬Java±¾À´¾ÍÊÇ´ÓC++ÑÜÉú³öÀ´µÄ¡£”
¡¡¡¡È»¶ø£¬C++ºÍJavaÖ®¼äÈÔ´æÔÚһЩÏÔÖøµÄ²îÒ ......

dm642 cÔËÐпâµÄmalloc·ÖÎö

cÔËÐпâmalloc·ÖÅäµÄÄÚ´æÔÚÄÄÀïÄØ£¬Ê×ÏÈÉÏ´úÂ룺
//ÄÚ´æ´óСÁ¬½ÓÆ÷½«ÆäµØÖ·Ö¸Ïò-heapÑ¡Ïî
extern _DATA_ACCESS int _SYSMEM_SIZE;
//ÄÚ´æÇøÓò
#pragma DATA_SECTION(_sys_memory, ".sysmem")
far PACKET _sys_memory[1] = { ((size_t)&_SYSMEM_SIZE) - sizeof(PACKET), 0 };
    
   ......

LINUXϽøÐÐCÓïÑÔ±à³Ì

Ô´³ÌÐò±àÒë  

MakefileµÄ±àд  

³ÌÐò¿âµÄÁ´½Ó  

³ÌÐòµÄµ÷ÊÔ  

Í·ÎļþºÍϵͳÇóÖú  


1.Ô´³ÌÐòµÄ±àÒë  

ÔÚLinuxÏÂÃæ,Èç¹ûÒª±àÒëÒ»¸öCÓïÑÔÔ´³ÌÐò,ÎÒÃÇҪʹÓÃGNUµÄgcc±àÒëÆ÷.   ÏÂÃæÎÒÃÇÒÔÒ»¸öʵÀýÀ´ËµÃ÷ÈçºÎʹÓÃgcc±àÒëÆ÷.  
......

o ra c le °²×°

 ¼ì²éÄں˲ÎÊý
ÕýÔÚ¼ì²é semmsl=250; ÒÑ·¢ÏÖ semmsl=250¡£ ͨ¹ý
ÕýÔÚ¼ì²é semmns=32000; ÒÑ·¢ÏÖ semmns=32000¡£ ͨ¹ý
ÕýÔÚ¼ì²é semopm=100; ÒÑ·¢ÏÖ semopm=32¡£ ʧ°Ü <<<<
ÕýÔÚ¼ì²é semmni=128; ÒÑ·¢ÏÖ semmni=128¡£ ͨ¹ý
ÕýÔÚ¼ì²é shmmax=536870912; ÒÑ·¢ÏÖ shmmax=33554432¡£ ʧ°Ü <<<< ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ