c ÓïÑÔÖеĴ«ÖµÓë´«ÒýÓÃ
#include<stdio.h>
int cubeByValue(int n);
int main(){
int number = 5 ;
printf("The original value of number is %d\n",number);
number = cubeByValue(number);
printf("The new value of number is %d\n",number);
return 0;
}
int cubeByValue(int n){
return n*n ;
}
#include<stdio.h>
void cubeByReference(int *nPtr);
int main(){
int number = 5 ;
printf("The original value of number is %d\n",number);
cubeByReference( &number );
printf("The new value of number is %d\n",number);
return 0;
}
void cubeByReference(int *nPtr){
*nPtr = *nPtr * *nPtr ;
}
Ïà¹ØÎĵµ£º
cÖ¸ÕëµÄÔËËãÓÐʱºò»¹ÊǺÜÃÔ»óÈ˵ġ£
ÀýÈ磺
struct student {
int num;
int score;
int length;
};
struct student *pt;
pt = (struct student *) malloc(sizeof(struct student));
pt->num = 1;
pt->score = 90;
pt->length = 3 * sizeof(int);
printf("pt length:%d\n", *pt);
pt = (int ......
1. cÓïÑÔÖеÄÕûÊýÀàÐÍÓÐchar, short, int, longµÈ¼¸ÖÖ, ÏÂÃæÊÇCÓïÑÔ¶ÔÿÖÖÊý¾ÝÀàÐͳ¤¶ÈµÄ¹æ¶¨:
(a). shortºÍlongÀàÐ͵ij¤¶È²»Ïàͬ
(b). intÀàÐÍͨ³£Í¬¾ßÌå»úÆ÷µÄÎïÀí×Ö³¤Ïàͬ
(c). shortͨ³£ÊÇ16bits, intͨ³£ÊÇ16bits or 32bitsÿÖÖ±àÒëÆ÷¿ÉÒÔ¸ù¾ÝÓ²¼þµÄ²»Í¬×ÔÓÉÈ·¶¨, µ«ÊÇshortºÍint±ØÐë×îÉÙÊÇ16bits, ¶ølongÀàÐͱØÐë× ......
mmapÊÇlinuxϵÄCreateFileMapping£¬ÓÃÀ´Ó³É䲢ͬ²½Îļþ¡£
ÕâÑùµÄ»°£¬±ÈÈçÎÒ×Ô¶¨ÒåÒ»ÖÖÎļþ¸ñʽ£¬°ÑËüдÈëµ½ÎļþÖУ¬ÏÖÔÚÏëÐÞ¸ÄÆäÖеÄÖµ£¬¾Í¿ÉÒÔÓÃÕâ¸öº¯Êý£¬°ÑÎļþÓ³Éäµ½ÄÚ´æÖÐ
È»ºóÓòÙ×÷Êý×éµÄ·½Ê½£¬À´½øÐÐÎļþµÄͬ²½¡£Èç¹û²»ÓÃÕâ¸öº¯Êý¾ÍµÃ£º
1¡¢¶¨ÒåÒ»¸ö½á¹¹Ìå
2¡¢¶¨Òå½á¹¹ÌåÊý×é
3¡¢¶ÁÈ¡Îļþ£¨w+£©
4¡¢ÐÞ¸ÄÎļþ ......
¼øÓÚÔÚÓÃCÓïÑÔдһЩ×Ö·û´®´¦ÀíµÄ³ÌÐòʱÖÖÖֵIJ»±ã,±¾È˼áÐÅ"Ä¥µ¶²»Îó¿³²ñ¹¦"Õâ¸öÐÅÌõ,ÓÚÊÇÔÚרÃÅ
½øÐÐÁËÒ»´ÎÄ¥¶ÔCÓïÑÔµÄÄ¥µ¶,дÁËһЩ×Ö·û´®µÄ´¦Àíº¯Êý, ·½±ãÍøÓÑʹÓÃ, ´ó¼ÒÓкõĽâ¾ö·½·¨Ò²Çë¸æÖªÒ»ÏÂ.
¡¡¡¡¡¡¡¡ÎÒ¹À¼ÆÓÐһЩCµÄ¿âÖп϶¨ÓбÈÎÒÕâ¸üºÃµÄº¯Êý, µ«ÊDZ¾ÈËûÓÐÕÒµ½, Íû"ÐмÒ"¸æÖª.
#include <string.h> ......
Ò»¡¢¸ÅÊö
̸µ½ÔÚlinuxϵͳϱàдI2CÇý¶¯£¬Ä¿Ç°Ö÷ÒªÓÐÁ½ÖÖ·½Ê½£¬Ò»ÖÖÊÇ°ÑI2CÉ豸µ±×÷Ò»¸ö
ÆÕͨµÄ×Ö·ûÉ豸À´´¦Àí£¬ÁíÒ»ÖÖÊÇÀûÓÃlinux I2CÇý¶¯Ìåϵ½á¹¹À´Íê³É¡£ÏÂÃæ±È½ÏÏÂÕâÁ½ÖÖÇý¶¯¡£
µÚÒ»ÖÖ·½·¨µÄºÃ´¦£¨¶ÔÓ¦µÚ¶þÖÖ·½·¨µÄÁÓÊÆ£©ÓУº
¡ñ &nbs ......