It is illegal to declare a recursive function as inline. Even a function is declared as inline compiler judges it to be inline or not. Many compilers can also inline expand some recursive functions; recursive macros are typically illegal.
The unsigned int is typecast into the signed value.
The semaphore is an abstract data store that is used to control resource accesses across the various threads of execution or across different processes. There are two types of semaphores: • The binary semaphore which can take only 0,1 values. (used when there is contention for a single resource entity) • The counting semaphore which […]
What is the order of calling for the constructors and destructors in case of objects of inherited classes?
The constructors are called with base class first order and the destructors are called in the child first order. That is, the if we have 2 levels of inheritance A (base)-> B (inherit 1)-> C (inherit 2) then the constructor A is called first followed by B and C. The C destructor is called first […]