Showing posts with label csc interview questions. Show all posts
Showing posts with label csc interview questions. Show all posts

atexit with _exit C interview question


atexit with _exit C interview question


Question: In the code below, the atexit() function is not being called. Can you tell why?
#include

void func(void)
{
    printf("\n Cleanup function called \n");
    return;
}

int main(void)
{
    int i = 0;

    atexit(func);

    for(;i<0xffffff _exit="" i="" pre="">
Answer: This behavior is due to the use of function _exit(). This function does not call the clean-up functions like atexit() etc. If atexit() is required to be called then exit() or ‘return’ should be used.

www.cinterviews.com appreciates your contribution please mail us the questions you have to cinterviews.blogspot.com@gmail.com so that it will be useful to our job search community

what pointer type for heterogeneous linked list?

The heterogeneous linked list contains different data types in its nodes and we need a link, pointer, to connect them. It is not possible to use ordinary pointers for this. So we go for void pointer. Void pointer is capable of storing pointer to any type as it is a generic pointer type.

CSC Interview Questions for cpp developer

CSC Interview Questions for cpp developer
1)Difference between C &C++
2.)Tell about Virtual functions with example
3)Tell Concept of Oops.
4)Polymorphism with real time example
5)Difference between function declaration and abstract class
6)Why the scope resoln operator can't be overloaded?
7)Tell about what happens of Construction and destruction of the derived class objects,
8)When are copy constructors called?
9)What are Templates
10)What is size of null class
11)Differentiaite between vector and array
12) Differentiate between C&C++ Structure
13)Difference between class and structure
14) Why we use C++ why not C ?
15)Can we have Virtual Constructure