L*******e 发帖数: 114 | 1 一点废话都没有,全是technical的东西,我实在太水了。
1. what happended after you type shell command in Linux?
2. what is the reason that shell hangs?
3. what is SIGCHILD and how to use it? how the parent process collect status
of child?
4. what is dynamic_cast? give a scenario that requires dynamic_cast? how
dynamic_cast is implmented?
5. What is the issue for the following program?
int main()
{
Foo *p = new Foo(1);
p->function1();
return 0;
}
Suppose Foo is defined already. I said the memory could be leaked, but
not a big deal as main terminates all memory gives back to kernel.It would
be nice if we delete the p after usage. He contiunes that even if we add "
delete p" after function call, it is still possible of memory leak. why? i
replied that "something goes wrong with functional() call". How to prevent?
6. compare map and hashtable? what is the complexity of inserting element to
a map?
what if I have only one element, which one to use?
7. Give two arrays, each contains one million number, how to find one common
on both? if no extra space is allowed, how to do?
8. how to call C++ function from C?
9. write a function in C to reverse a string
10. design a memory pool
11. array vs. linked list.
12. how static is used in C++? suppose you declare a static variable inside
a function, is this variable accessible from outside? |
|