<address id="ousso"></address>
<form id="ousso"><track id="ousso"><big id="ousso"></big></track></form>
  1. 東芝筆試題目

    時間:2020-12-07 10:37:49 筆試題目 我要投稿

    東芝筆試題目

      筆試題目(一)

    東芝筆試題目

      1. 將程序改成Unicode編程需要做哪些修改?

      window 2k以后的系統底層都是基于Unicode的,就算你調用ANSI的API(以A結尾比如SetWidowsTextA),系統也會在你的進程默認堆上動態分配一塊內存,存放轉換后的Unicode字符串,然后把轉換后的字符串傳遞給API,如果調用了返回值為ANSI字符串的API,Windows會在后臺進行相反的轉換。

      其實VC中進行Unicode編程也不麻煩,大概如下:

      1.為工程添加UNICODE和_UNICODE預處理選項,在VC.net中就是 項目 -> 屬性 -> c/c++ -> 預處理器 在"預處理定義"中加入這兩個宏定義(vc6中 project -> settings -> c/c++ -> general 中的 Preprocessor definitions).

      2.Include (一般在stdafx.h中)然后把所有使用char*定義變量的地方換為LPTSTR/TCHAR*或LPCTSTR/const TCHAR*(對應于const char*).

      3.把所有的字符串常量用_T()宏包起來,比如 TCHAR* szText = _T("我的Text");

      4.所有的C庫字符串操作函數也做相應的替換,比如

      strlen ->_tcslen

      strcat ->_tcscat

      strcmp ->_tcscmp

      ......

      注意,這些函數中的"文本長度"均為字符個數,而非char個數具體參看MSDN.

      5.API調用一般不用做特殊處理,當定義了UNICODE和_UNICODE后,所有的API都會被宏指向W結尾的版本(不定義則指向A結尾的`版本).

      其實,上面所說的并非強制你使用UNICODE,如果你還想回去使用ANSI,沒有問題,把第一步定義的兩個宏拿掉就OK了,繼續我們的ANSI編程。

      2. TCHAR同char的區別

      TCHAR 就是當你的字符設置為什么就是什么

      例如:程序編譯為 ANSI, TCHAR 就是相當于 CHAR

      當程序編譯為 UNICODE, TCHAR 就相當于 WCHAR ,每個字符占兩個字節

      3. BOOL同bool的區別

      意義上沒什么區別,但卻是兩種類型.

      bool應該是C語言里定義的,返回值為true和false(事實上就上1和0)

      而BOOL應該是MFC及SDK里定義返回值的.

      它的定義應該是:typedef int BOOL;(WINDEF.H中定義)

      也就是說它是int型的

      返回值是大寫的TRUE 和FALSE

      定義如下:

      #define FALSE 0

      #define TRUE 1

      (AFX.H中如此定義)

      一個是布爾型,一個是整型.

      事實上整型如果取1和0就可以代替布爾型了.

      --博才網博才網

      筆試題目(二)

      1. :A tape manufacturer reduces the price of his heavy duty tape from Rs.30/- to Rs.28/- a reel and the price of a regular tape from Rs.24/- to Rs.23/- a reel . A computing centre normally spends Rs.1440/- a month for tapes and 3/4 of this is for heavy duty tapes. How much will they save a month under the new prices?

      Ans.Rs.87 132

      2. shl測評題:In a team of 12 persons, 1/3 are women and 2/3 are men. To obtain a team with 20% women how many men should be hired?

      Ans.8

      3. :The dimensions of a certain machine are 48″ X 30″ X 52″. If the size of the machine is increased proportionately until the sum of its dimensions equals 156″, what will be the increase in the shortest side?/

      Ans. 6″

      4. shl測評題:In a certain company, 20% of the men and 40% of the women attended the annual company picnic. If 35% of all the employees are man, what percent of all the employees went to the picnic?

      Ans.33% 21%

      5. :It cost a college Rs.0.70 a copy to produce a Programme for the homecoming football game. If Rs.15,000/- was received for advertisements in the programme, how many copies at Rs.0.50 a copy must be sold to make a profit of Rs.8000/- ?

      Ans. 35000

    【東芝筆試題目】相關文章:

    會計筆試題目07-03

    EXCEL筆試題目06-12

    美的筆試題目12-15

    惠普筆試題目08-10

    伊利筆試題目07-09

    夏普筆試題目07-03

    奧美筆試題目06-18

    LG筆試最常考的筆試題目07-09

    Intel筆試真題技術筆試題目06-27

    營銷崗位筆試題目10-01

    <address id="ousso"></address>
    <form id="ousso"><track id="ousso"><big id="ousso"></big></track></form>
    1. 日日做夜狠狠爱欧美黑人