CÓïÑԸ߼¶²âÊÔ£ºÎªC³ÌÐòÔ±×¼±¸µÄ0x10¸ö×î¼ÑÎÊÌâ
Õû¸ö²âÊÔ×ñÑÒÔϵÄÔ¼¶¨£º
u
¼Ù¶¨ÔÚËùÓеijÌÐòÖбØÐëµÄÍ·Îļþ¶¼ÒѾ±»ÕýÈ·°üº¬¡£
¿¼ÂÇÈçϵÄÊý¾ÝÀàÐÍ£º
u
char
Ϊ
1
¸ö×Ö½Ú
u
int
Ϊ
4
¸ö×Ö½Ú
u
long int
Ϊ
4
¸ö×Ö½Ú
u
float
Ϊ
4
¸ö×Ö½Ú
u
double
Ϊ¸ö
8
×Ö½Ú
u
long double
Ϊ
8
¸ö×Ö½Ú
u
Ö¸ÕëΪ
4
¸ö×Ö½Ú
1. Consider the following program:
#include<setjmp.h>
static jmp_buf buf;
main()
{
volatile int b;
b =3;
if(setjmp(buf)!=0)
{
printf("%d ", b);
exit(0);
}
b=5;
longjmp(buf , 1);
}
The output for this program is:
(a) 3
(b) 5
(c) 0
(d) None of the above
2. Consider the following program:
main()
{
struct node
{
int a;
int b;
int c;
};
struct node s= { 3, 5,6 };
struct node *pt = &s;
printf("%d" , *(int*)pt);
}
The output for this program is:
(a) 3
(b) 5
(c) 6
(d) 7
3. Consider the following code segment:
int foo ( int x , int n)
{
int val;
val =1;
if (n>0)
{
if (n%2 == 1) val = val *x;
val = val * foo(x*x , n/2);
}
return val;
}
What function of x and n is compute by this code segment?
(a) x^n
(b) x*n
(c) n^x
(d) None of the above
4. Consider the following program:
main()
{
int a[5] = {1,2,3,4,5};
&nbs
Ïà¹ØÎĵµ£º
×î½üÔÚ×öÒ»¸öI2C¼üÅ̵ÄLinuxÇý¶¯£¬²Î¿¼ÁËÆäËûоƬµÄһЩ´úÂ룬ÆäÖÐÂ½Ðø·¢ÏÖÓÐЩÈÃÈËÃÔ»óµÄ¶«Î÷£¬°ÑÎÒµÄÃÔ»ó¼°Àí½âÔÚÕâÀï¼ÓÒԼǼ£º
1. i2c_driver½á¹¹ÌåµÄprobe³ÉÔ±µÄÔÐÍ£º
int (*probe)(struct i2c_client *, const struct i2c_device_id *);
¼´£ºprobeº¯Êý±»µ÷ÓÃʱ»á´ÓÉϱߴ«Á½¸ö¸ö²Î ......
Êý×鸳ֵÎÒ×ܽáһϰÉÒ²¾ÍÈýÖÖ£¬ÄÇcharµÄÀ´¾ÙÀý£º
¶¨ÒåµÄʱºòÖ±½Ó¸³Öµ.
1£ºchar a[20] = "Hello World!";
2: char a[20];
strcpy(a, "Hello World!");
3:char a[20] = {'H', 'e', 'l', 'l', 'o', ' ', 'W', 'o', 'r', 'l', 'd', '!'};
³£¼û´íÎó¸³Öµ·½Ê½:
1:char a[20];
a = "Hello World ......
CRTÔÏÈÊÇÖ¸Microsoft¿ª·¢µÄC Runtime Library£¬ÓÃÓÚ²Ù×÷ϵͳµÄ¿ª·¢¼°ÔËÐС£ºóÀ´ÔÚ´Ë»ù´¡ÉÏ¿ª·¢ÁËC++ Runtime Library£¬ËùÒÔÏÖÔÚCRTÊÇÖ¸Microsoft¿ª·¢µÄC/C++ Runtime Library¡£ÔÚVCµÄCRT/SRCĿ¼Ï£¬¿ÉÒÔ¿´µ½CRTµÄÔ´Â룬²»½öÓÐCµÄ£¬Ò²ÓÐC++µÄ¡£
CRTÔÏȵÄÄ¿µÄ¾ÍÊÇÖ§³Ö²Ù×÷ϵͳµÄÔËÐ ......
ÔÌûÒ»£ºhttp://blog.csdn.net/dotphoenix/archive/2009/05/20/4203075.aspx
ÔÌù¶þ£ºhttp://www.cocoachina.com/bbs/read.php?tid-8008.html
@property (²ÎÊý) ÀàÐÍ Ãû×Ö;
ÕâÀïµÄ²ÎÊýÖ÷Òª·ÖΪÈýÀࣺ¶ÁдÊôÐÔ£¨readwrite/readonly£©£¬setterÓïÒ⣨assign/retain/copy£©ÒÔ¼°atomicity£¨nonatomic£©¡£
assign/retain/copy ......
1 ±à³Ì»ù´¡
1.1 »ù±¾¸ÅÄî
1. µÄÀí½â£ºconst char*, char const*, char*constµÄÇø±ðÎÊÌ⼸ºõÊÇC++ÃæÊÔÖÐÿ´Î ¶¼»áÓеÄÌâÄ¿¡£ ÊÂʵÉÏÕâ¸ö¸ÅÄî˶¼ÓÐÖ»ÊÇÈýÖÖÉùÃ÷·½Ê½·Ç³£ÏàËÆºÜÈÝÒ׼ǻ졣 Bja ......