Killer Quetions and Answers Q&A

  1. Calculate in mind: how much is 128 power two?:

    Details

    Answer: 16384

    Tip: The trick is 128 power 2 = (130-2) power two and this is quite easily (30 sec for a good speed) calculated in mind:

    16900 - 520 + 4 gives 16384.

  2. What would be your development plan to write a language like ASP or PHP?:

    Details

     

  3. When writing a remote server you have a choice:

    (1) to write DCOM server;
    (2) to write TCP/IP server;

    What's the difference?

    Details

     

  4. What 3 methods are always on top of any C++ interface?

    Details

    These methods are 3 methods of IUnknown interface:

    (1) QueryInterface;
    (2) AddRef;
    (3) Release;

    The pointers to these methods are on top of VTable. Any custom methods located beneath 3 methods of IUnknown interface.

  5. What's the difference between _beginthreadex and CreateThread?:

    Details

     

  6. In Win32, what's the difference between SendMessage and PostMessage?:

    Details

     

  7. In C++, what's the difference between "struct" and "class" keywords?:

    Details

     

  8. In Win32, what's the difference between LPSTR, LPCSTR, LPTSTR and LPTCSTR data types?:

    Details

     

  9. What's the difference between 2 types of syntax when making includes:

    #include <filename.h> and #include "filename.h"?

    Details

     

  10. What's the difference between 2 definitions:

    #define MAX_NUMBER 100

    and

    const char[] szMaxNumber = "100";

    Details

     

  11. In ATL, what is the purpose of ATL_NO_VTABLE macro in ATL class definition?

    class ATL_NO_VTABLE C<classname>: <listofbaseclassesandinterfaces>
    {
    <...>
    };

    Details

     

  12. Describe the differencies between Win32 and COM DLL.

    Details

     

  13. What's the difference between TCHAR and char types?

    Details

     

  14. What is interface? Explain differencies between class and interface.

    Details

     

  15. In C++, what's the difference between initializations:

    (1) C<classname> * m_p<variblename>;
    (2) C<classname> * m_p<variblename> = new C<classname>;

    Details

     

© (c) 2002, Stanislav Malevanny