MS interview questions

Source: Internet
Author: User

Microsoft Asia Technical Center interview questions

1. Differences between processes and threads.
2. Differences between heap and stack.
3. How is the memory managed in windows?
4. Introduce the security of. NET and. net.
5. How does the client access the. NET component to implement web service?
6. How does a virtual table in C/C ++ compiler complete it?
7. Talk about the com thread model. Then, we will discuss the differences between internal and external components.
8. Talk about the paging mechanism under ia32
9. For two variables, how can we find out where a ring exists in a single linked list with a ring?
10. How many methods does ia32 switch from user to kernel?
11. If you only want to run one instance of the program, you cannot run two instances. Like Winamp, only one window can be opened. How can this problem be implemented?
12. How can I intercept the keyboard response and change all 'A' to 'B '?
13. What is the use of apartment in com? Why?
14. What is a stored procedure? What is the purpose? What are the advantages?
15. What are the features of a template? When will it be used?
16. Let's talk about the features and advantages of Windows DNA structure.

Answer:
1. Differences between processes and threads.
A thread is an execution unit in a process and a schedulable entity in the process.
Differences from processes:
(1) Address Space: an execution unit in a process; the process must have at least one thread; they share the address space of the process; and the process has its own address space;
(2) resource ownership: a process is the unit of resource allocation and ownership. threads in the same process share the resources of the process.
(3) threads are the basic unit of Processor Scheduling, but processes are not.
(4) both can be executed concurrently.

2. Differences between heap and stack.
Heap is a stack, and stack is a stack.
Stack space is automatically allocated/released by the operating system, and heap space is manually allocated/released.
Stack space is limited, and heap is a large free storage zone.
The memory allocated by the malloc function in C is on the heap, and the c ++ corresponds to the new operator.
During the compilation period, the program performs variable and function allocation memory on the stack, and the parameter transfer is also performed on the stack when the function is called during the program running.
......

9. For two variables, how can we find out where a ring exists in a single linked list with a ring?
One increments One and Two. When they point to the same point, the ring appears.

11. If you only want to run one instance of the program, you cannot run two instances. Like Winamp, only one window can be opened. How can this problem be implemented?
Use memory ing or global atomic (mutex variable) to find the window handle...

12. How can I intercept the keyboard response and change all 'A' to 'B '?
Keyboard hook

14. What is a stored procedure? What is the purpose? What are the advantages?
My understanding is a collection of SQL statements that can be used to create complex queries and compile and run them. Therefore, after a single run, it is much faster to run the query later than to execute the SQL statement separately...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.