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

[ÃæÊÔÌâ]C»ù´¡ÌâÄ¿

±àÕß°´:·Ç³£»ù±¾¹ØÓÚCÓïÑÔµÄÎÊÌâ,Ò»¸öÐÅÏ¢Àà(¼ÆËã»ú,×ÊѶ¹¤³Ì,µç×Ó¹¤³Ì, ͨÐÅ
¹¤³Ì)רҵµÄ±¾¿Æ±ÏÒµÉúÓ¦¸Ã´ïµ½µÄˮƽ¡£ÌâÄ¿²»ÄÑ,È«²¿¶¼ÄÜ¿ìËٵشðÍ꣬µ±È»Ò²ÐèÒª
Ò»¶¨µÄ֪ʶ´¢±¸¡£
¶ÔÓÚ´ó¶àÊýÈË£¬ÎÒÃÇÔ¤ÆÚÄã¿ÉÄÜ´ð´í 1)  4)  15)Ì⣬ËùÒÔ´ð´í3µÀÒÔÄڵģ¬ÎÒÃÇÈÏΪ
ÄãºÜ°ô
´ð´í5µÀÌâÒÔÄÚ£¬ÎÒÃÇÈÏΪÄ㻹²»´í(Ä㻹¿ÉÄÜ´ð´íµÚ9Ìâ)
Èç¹ûÄãÓÐ6µÀÒÔÉϵÄÌâÄ¿²»ÄÜ´ð¶Ô,»ù±¾ÉÏÎÒÃǶ¼²»ºÃ˵ʲôÁË....
Ô¼¶¨:
  1) ÏÂÃæµÄ²âÊÔÌâÖУ¬ÈÏΪËùÓбØÐëµÄÍ·Îļþ¶¼ÒѾ­ÕýÈ·µÄ°üº¬ÁË
    2)Êý¾ÝÀàÐÍ   
        char Ò»¸ö×Ö½Ú 1 byte
        int Á½¸ö×Ö½Ú 2 byte (16λϵͳ £¬ÈÏΪÕûÐÍÊÇ2¸ö×Ö½Ú)
        long int Ëĸö×Ö½Ú 4 byte
        float  Ëĸö×Ö½Ú4 byet
        double °Ë¸ö×Ö½Ú 8 byte
        long double Ê®¸ö×Ö½Ú 10 byte
        pointer Á½¸ö×Ö½Ú 2 byte(×¢Ò⣬16λϵͳ,µØÖ·×ÜÏßÖ»ÓÐ16λ)
µÚ1Ìâ: ¿¼²é¶Ôvolatile¹Ø¼ü×ÖµÄÈÏʶ
#include
static jmp_buf  buf;
main()   
{
  volatile  int b;
  b =3;
  if(setjmp(buf)!=0)  
  {
    printf("%d ", b);  
    exit(0);
  }
  b=5;
  longjmp(buf , 1);
}  
ÇëÎÊ£¬Õâ¶Î³ÌÐòµÄÊä³öÊÇ
(a) 3
(b) 5
(c) 0
(d) ÒÔÉϾù²»ÊÇ
µÚ2Ìâ:¿¼²éÀàÐÍת»»
main()
{
  struct node
  {
    int a;
    int b;
    int c;   
  };
  struct node  s= { 3, 5,6 };
  struct node *pt = &s;
  printf("%d" ,  *(int*)pt);
}
Õâ¶Î³ÌÐòµÄÊä³öÊÇ:
(a) 3
(b) 5
(c)


Ïà¹ØÎĵµ£º

Boost Python ʵÏÖCµ÷ÓÃpython´íÎó½â¾ö·½·¨

ÓÉÓÚBoost Python¸ú²»ÉÏPython°æ±¾¸üУ¬ÈçÏ·½·¨µ÷ÓÿÉÄܲúÉúTypeError: 'NoneType' object does not support item assignmentÒì³£¡£
Boost PythonÎĵµÖÐÀý×Ó¿ÉÄܲúÉúÒì³£¡£
Py_Initialize();
object main_module = import("__main__");
object main_dict = main_module.attr("__dict__");
try{
   object ......

C±ê×¼¿âÔ´Âë½âÆÊ(14)£ºÍ¨Óú¯Êýstdlib.h

    ͨÓú¯Êý¿âÔÚÍ·Îļþstdlib.hÖÐÉùÃ÷£¬±È½ÏÅÓ´ó£¬Ö÷Òª·ÖΪÒÔϼ¸´óÀࣺ´æ´¢·ÖÅä¡¢Ëæ»úÊýÉú³É¡¢Êý×Öת»»ÓëÕûÐÍÔËËã¡¢³ÌÐòÍ˳öÓë»·¾³Í¨ÐÅ¡¢ËÑË÷ÓëÅÅÐò¡¢¶à×Ö½ÚÓë¿í×Ö·ûµÄת»»¡£ÓÉÓÚ¼³¼°µ½´æ´¢·ÖÅä¡¢»·¾³Í¨Ðŵȣ¬Òò´ËËüÃǵĴó¶àÊýÒ²ÒÀÀµÓÚ²Ù×÷ϵͳ¡£glibcÖУ¬Í¨Óú¯Êý¿âµÄºËÐÄʵÏÖÔÚstdlibºÍmallocÁ½¸öĿ¼Ï ......

LinuxÏ»ñµÃϵͳʱ¼äµÄCÓïÑÔµÄʵÏÖ·½·¨

 LinuxÏ»ñµÃϵͳʱ¼äµÄCÓïÑÔµÄʵÏÖ·½·¨
#include<time.h>  //CÓïÑÔµÄÍ·Îļþ
#include<stdio.h>  //CÓïÑÔµÄI/O
void main()
{
time_t now;    //ʵÀý»¯time_t½á¹¹
struct tm  *timenow;    //ʵÀý»¯tm½á¹¹Ö¸Õë
time(&now);
//timeº¯Êý¶ÁÈ¡ÏÖÔÚµ ......

C/C++/VC ʵÏÖ×Ö·û´®Äæ×ªµÄ¶àÖÖ·½·¨

/¼ÓÁËÏÂÃæÁ½¸öÍ·Îļþ£¬ÊÇΪÁËÔÚWin32¹¤³ÌÖÐʹÓÃMFCµÄÌØÐÔ!
#include <afx.h>
#include <afxwin.h>
#include "stdio.h"
#include "conio.h"
////¼ÓÁËÏÂÃæÁ½¾ä£¬ÊÇΪÁËÄܹ»ÓÃstring(basic_stringÀàÐÍ)
#include <string>
using namespace std;
int main(int argc, char* argv[ ......

extern "C"

extern "C"
¡¡¡¡extern "C" °üº¬Ë«Öغ¬Ò壬´Ó×ÖÃæÉϼ´¿ÉµÃµ½£ºÊ×ÏÈ£¬±»ËüÐÞÊεÄÄ¿±êÊÇ“extern”µÄ£»Æä´Î£¬±»ËüÐÞÊεÄÄ¿±êÊÇ“C”µÄ¡£ÈÃÎÒÃÇÀ´Ïêϸ½â¶ÁÕâÁ½Öغ¬Òå¡£
¡¡¡¡£¨1£© ±»extern "C"ÏÞ¶¨µÄº¯Êý»ò±äÁ¿ÊÇexternÀàÐ͵ģ»
¡¡¡¡externÊÇC/C++ÓïÑÔÖбíÃ÷º¯ÊýºÍÈ«¾Ö±äÁ¿×÷Ó÷¶Î§£¨¿É¼ûÐÔ£©µÄ¹Ø¼ü×Ö£ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ