Phone Screen

  1. What is dead lock, how can you make one?
    A deadlock is a situation wherein two or more competing actions are waiting for the other to finish, and thus neither ever does.
    deadlock
  2. What is shared memory? How it works?
    a (typically) large block of random access memory that can be accessed by several different central processing units (CPUs) in a multiple-processor computer system.
    cp) cache coherance, memory coherance
  3. What in inline function? Which  functions cannot be inlined?

    The following types of C and C++ functions cannot be inlined:

    Certain C/C++ functions can only be inlined into the file which contains their definition:

  4. List the disadvantages of Multiple Inheritance.
    a class can inherit behaviors and features from more than one superclass.
    Languages that mostly support multiple inheritance are: Eiffel, C++, Python, Perl, and CLOS.
    increased complexity and ambiguity, as well as versioning and maintenance problems

    Multiple Inheritance is the process whereby a sub-class can be derived from more than one super class. The advantage of multiple inheritance is that it allows a class to inherit the functionality of more than one base class thus allowing for modeling of complex relationships. The disadvantage of multiple inheritance is that it can lead to a lot of confusion when two base classes implement a method with the same name.
  5. Questions about stack and heap.
    S stack and heap

 

Onsite:

  1. What when a process, what is its address space lay out? (data area, stack, heap, process information, environment variables)
  2. How the OS load and execute files ( load process,set up space, to virtual memeory)
  3. How compiler works, e.g. cc hello.c
  4. What¡¯s the difference between hello.o, hello.exe and hello.dll
  5. differences between Pipe and Socket
  6. Intercrosses communications in Unix, list several that you know.
  7. What is firewall
  8. Design patterns and give examples how you use them in your work
  9. In what situation could Garbage Collection fail?
  10. strncpy vs memcpy
  11. compare Array and Linked list; compare doubly linked-list and singly-linked list
  12. List all the possible scopes for variable in C or C++, list as much as you can.
  13. What does it mean if your read from socket returns 0?
  14. When you try to pass an SQL value into a C++ string, what you should do first? (Set the string to 0 because SQL string doesn¡¯t have null terminate)
  15. Write a function to remove spaces in a string
  16. write function to print out the third level nodes in a tree.
  17. Which language do you prefer, C# or C++?
  18. List the difference between C# and C++
  19. List the Difference between Java and C++
  20. Talking about Java Clone()
  21. XML schema and different ways to do it
  22. What do u do if you add new features to a software, what will u do before put the feature into release?
  23. If you have a directory of hundreds of files, .c, txt or other type which is left by the previous employee. What do you do with it?
  24. Why do u want to work here
  25. what do you think you can contribute if we hire you
    Cpp Interview question
    1. What is a virtual method? A pure virtual method? When would you use/not use a virtual destructor?

    2. What is the difference between a pointer and a reference?
    A reference must always refer to some object and, therefore, must always be initialized; pointers do not have such restrictions. A pointer can be reassigned to point to different objects while a reference always refers to an object with which it was initialized.

    3. What is the difference between new/delete and malloc/free?
    Malloc/free do not know about constructors and destructors. New and delete create and destroy objects, while malloc and free allocate and deallocate memory.

    4. What does const mean?
    5. What methods should every c++ class define and why?
    6. What does main return?
    7. Explain what the header for a simple class looks like.
    8. How do you handle failure in a constructor? According to Bjarne Stroustup, designer of the C++ language, you handle failures in a constructor by throwing an exception. See here for more details, including a link to his document on exception safety and the standard library: http://www.arkestra.demon.co.uk/errors_cpp.html#acquire_resources_in_constructors
Simple Coding
find whether the m/c is big endian or little endian
unsigned int x=1;
if(*(char*(&x)==1)
print little endian
else
print big endian

OpenGL Pipleline
vocs
|Modeling Transform (into World Coordinate System)
vwcs
|Viewing Transform (into Viewing Coordinate System)
vvcs
|Projection Transform (into Clipping Coordinate System)
vccs
|Perspective Division (into Normalized Device Coordinate System)
vndcs
|Viewport Transform (into Device Coordinate System)
vdcs
OpenGL lighting model

volatile in C
It is optimization trick. It tells the compiler not to use CPU register to cache the value of the variable.
It is used for pointers especially driver programming. It makes sure that compiler makes the instruction to go directly the memory instead of the register for any time it is accessed.
TLB TLB(translation look-aside buffer) keeps a "cache" of virtual address-page frame translations.


Context Switching

Make sure the memory coherence

Describe our design process when given a software development task.

Sorting Algorithms
Sorting Algorithms
Bubble sort
Heap sort
Insertion sort
Merge sort
Quick sort
Selection sort
Shell sort

         


   

Google