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

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


Ïà¹ØÎĵµ£º

50¸öc/c++Ô´´úÂëÍøÕ¾

C/C++ÊÇ×îÖ÷ÒªµÄ±à³ÌÓïÑÔ¡£ÕâÀïÁгöÁË50ÃûÓÅÐãÍøÕ¾ºÍÍøÒ³Çåµ¥£¬ÕâЩÍøÕ¾Ìṩc/c++Ô´´úÂë ¡£Õâ·ÝÇåµ¥ÌṩÁËÔ´´úÂëµÄÁ´½ÓÒÔ¼°ËüÃǵÄС˵Ã÷¡£ÎÒÒѾ¡Á¦°üÀ¨×î¼ÑµÄC/C++Ô´´úÂëµÄÍøÕ¾¡£Õâ²»ÊÇÒ»¸öÍêÕûµÄÇåµ¥£¬ÄúÓн¨Òé¿ÉÒÔÁªÏµÎÒ£¬ÎÒ½«»¶Ó­ÄúµÄ½¨ Ò飬ÒÔ½øÒ»²½¼ÓÇ¿Õâ·½ÃæµÄÇåµ¥¡£ 
1¡¢http://snippets.dzone.com/tag/c/&nbs ......

#ÔÚCÖеÄÃîÓÃÄãÖªµÀ¶àÉÙ

CÖеÄ#ºÅ²»½öÊÇ#include£¬#defineµÈµÄ¹Ø¼ü×ÖÊ×ʹÓöøÒÑ£¬#ÔÚºêÖл¹ÓкܶàÓ÷¨¡£¾ßÌåÇë¿´ÏÂÃæÎÒÀ´¾ÙÀý
1.Ë«#ºÅµÄºêÓ÷¨¡£
ÎÒÏàÐÅË«##ºÅµÄÓ÷¨Ó¦¸Ã´ó²¿·ÖÈ˶¼¼û¹ý°É£¬Ö÷ÒªÊÇÓÃÀ´Á¬½Óºê±äÁ¿ÃûʹÓã¬ÔÚGCC²Î¿¼ÊÖ²áÖÐÕâÑù¼ÇÔØ¡£
¿ÉÓÃÓÚºêÄÚ²¿½«Á½¸öÔ´´úÂëȨ±êÁ¬½Ó³ÉÒ»¸öµÄÁ¬½Óָʾ×Ö£¬¿ÉÓÃÀ´¹¹Ôì²»»á±»½âÎöÆ÷´íÎó½âÊ͵ÄÃû×Ö¡£ ......

Linux I2C InputÉ豸Çý¶¯´úÂëµÄ¼¸µãÀí½â

×î½üÔÚ×öÒ»¸öI2C¼üÅ̵ÄLinuxÇý¶¯£¬²Î¿¼ÁËÆäËûоƬµÄһЩ´úÂ룬ÆäÖнÐø·¢ÏÖÓÐЩÈÃÈËÃÔ»óµÄ¶«Î÷£¬°ÑÎÒµÄÃÔ»ó¼°Àí½âÔÚÕâÀï¼ÓÒԼǼ£º
1. i2c_driver½á¹¹ÌåµÄprobe³ÉÔ±µÄÔ­ÐÍ£º
     int (*probe)(struct i2c_client *, const struct i2c_device_id *);
¼´£ºprobeº¯Êý±»µ÷ÓÃʱ»á´ÓÉϱߴ«Á½¸ö¸ö²Î ......

ÔÚEclipseÖпª·¢C/C++ÏîÄ¿ תÌû


C/C++ development with the Eclipse Platform
Pawel Leszek
 
ÕªÒª:ͨ¹ý±¾ÎÄÄ㽫»ñµÃÈçºÎÔÚEclipseƽ̨ÉÏ¿ª·¢C/C++ÏîÄ¿µÄ×ÜÌåÈÏʶ¡£ËäÈ»EclipseÖ÷Òª±»ÓÃÀ´¿ª·¢JavaÏîÄ¿£¬µ«ËüµÄ¿ò¼ÜʹµÃËüºÜÈÝÒ×ʵÏÖ¶ÔÆäËû¿ª·¢ÓïÑÔµÄÖ§³Ö¡£ÔÚÕâƪÎÄÕÂÀÄ㽫ѧ»áÈçºÎʹÓÃCDT(C/C++ Development Toolkit)£¬Ò»¸öÔÚEclipseƽ̨ÉÏ×î ......

C Runtime LibraryÀ´Àú, API, MFC, ATL¹Øϵ

CRTÔ­ÏÈÊÇÖ¸Microsoft¿ª·¢µÄC Runtime Library£¬ÓÃÓÚ²Ù×÷ϵͳµÄ¿ª·¢¼°ÔËÐС£ºóÀ´ÔÚ´Ë»ù´¡ÉÏ¿ª·¢ÁËC++ Runtime Library£¬ËùÒÔÏÖÔÚCRTÊÇÖ¸Microsoft¿ª·¢µÄC/C++ Runtime Library¡£ÔÚVCµÄCRT/SRCĿ¼Ï£¬¿ÉÒÔ¿´µ½CRTµÄÔ´Â룬²»½öÓÐCµÄ£¬Ò²ÓÐC++µÄ¡£
       CRTÔ­ÏȵÄÄ¿µÄ¾ÍÊÇÖ§³Ö²Ù×÷ϵͳµÄÔËÐ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ