background preloader

Programming Interview Questions

Programming Interview Questions

Programming Praxis | A collection of etudes, updated weekly, for the education and enjoyment of the savvy programmer Section 8.9.  Race Conditions 8.9. Race Conditions For our purposes, a race condition occurs when multiple processes are trying to do something with shared data and the final outcome depends on the order in which the processes run. We saw a potential race condition in the program in Figure 8.8 when the second child printed its parent process ID. A process that wants to wait for a child to terminate must call one of the wait functions. while (getppid() ! The problem with this type of loop, called polling, is that it wastes CPU time, as the caller is awakened every second to test the condition. To avoid race conditions and to avoid polling, some form of signaling is required between multiple processes. For a parent and child relationship, we often have the following scenario. We assume that the header apue.h defines whatever variables are required. Example The program in Figure 8.12 outputs two strings: one from the child and one from the parent. $ . In the program shown in Figure 8.13, the parent goes first.

Happy Codings - Programming Sample Code Source Code Search Engine, Example Codes Unix - Shell Basic Operators There are various operators supported by each shell. Our tutorial is based on default shell (Bourne) so we are going to cover all the important Bourne Shell operators in the tutorial. There are following operators which we are going to discuss: Arithmetic Operators.Relational Operators.Boolean Operators.String Operators.File Test Operators. The Bourne shell didn't originally have any mechanism to perform simple arithmetic but it uses external programs, either awk or the must simpler program expr. Here is simple example to add two numbers: #! This would produce following result: Total value : 4 There are following points to note down: There must be spaces between operators and expressions for example 2+2 is not correct, where as it should be written as 2 + 2.Complete expression should be enclosed between ``, called inverted commas. Arithmetic Operators: There are following arithmetic operators supported by Bourne Shell. Assume variable a holds 10 and variable b holds 20 then: Show Examples

VIM Adventures 100 Intro Open Courses on Everything You've Ever Wanted to Learn Posted on Wednesday May 12, 2010 by Staff Writers While the classes you take through an online college are a great resource, you can augment your learning by taking some time to see what entirely free courses are out there offered by universities. Taking these courses can be a great way to get a foundation of knowledge or expand on what you already know. Here are 100 open courses that are designed for beginners, so you can start your educational journey on the right foot. Business and Finance These courses will help you learn a little bit more about the business and financial worlds. Introductory Economics: Take this course to learn the basics of economics. Math Improve your understanding of math with these courses. Introduction to Probability and Statistics: Learn how to better use statistics and probability in real life through this course. Science Through these courses you can gain some valuable scientific knowledge. Literature Social Sciences History and Politics Technology Engineering

9 Websites That Will Challenge Programmers! 1. Top Coder This is the biggest competitive software development community in the world. It has members from over 200 countries and the number of members spread over 200,000. You can find contests in Java, C# and C++. 2. This website originates in India and has over 25,000 members. 3. This is a website by the World Bank, inviting developers to create innovative tools and apps by making use of the data that it has collected through its Open Data Initiative. 4. Facebook's Engineering Puzzles are available on the company's careers page. 5. This website hosts monthly contests. 6. This website hosts two programming contests every year. 7. This website contains a number of programming problems that can be solved using various programming languages. 8. This is a well known website amongst programmers, which hosts challenges in computer and mathematics. 9. As evident from the name, this website hosts challenges to be solved using the Python programming language.

Learn Code The Hard Way -- Books And Courses To Learn To Code Project 1 :: Fluidui.com FluidUI.com (Fluid UI) uses cookies and saves data on our servers in order to provide the Fluid UI service. This data is gathered in order to provide the relevant functionality for your account. The purpose of this article is to inform you what information we store, when we request it and why we need it. Your email address is used to create a unique identifier for your account when you sign up. It is also used to inform you of important updates relating to Fluid UI and your account. Your password (encrypted), IP address, and sign in history are saved to allow you sign in from different locations and to be able to ensure the security of your account. Third party services providers Fluid UI also uses a number of third party services providers in order to provide the Fluid UI service: Google Google Analytics is used to anonymously track who is visiting our site, how long they are staying and where they are coming from in order to allow us to improve how we sell the Fluid UI service.

Code & Conquer Most Important: Have Fun. And earn some badges. See how your strategy works out in different scenarios, challenge other players, receive points, earn badges and climb your way to the top of the leaderboard. Boost your coding skills. This game provides the perfect setting to introduce the key concepts employers ask you to know.

Related: