Entries from 2009
Easiest way to store variables
What is the easiest way to store variables? Explain. The easiest way to store the values of the variables is in a 26-element array; the single-letter variable name can be used to index the array. But if the grammar is to process both variable names and values in the same stack, yacc has to be told Read More...
Fork
Explain about fork. Splitting is done by a system call named fork. Proc_id = fork (); splits the program into two copies, both of which continue to run. The only difference between the two is the value returned by fork, the process-id. Two copies of the program are made by the fork. In the child, Read More...
Process of “spnameâ€
Describe the process of “spnameâ€. The operation of spname is straightforward enough, although there are a lot of boundary conditions to get right. Suppose the file name is /d1/d2/f. The basic ideas is to peel off the first component (/), then search that directory for a name close to the nest component (dl), then search Read More...
function of “errnoâ€
What function does “errno†do? Sometimes it is nice to know what specific error occurred; for this purpose all system calls, when appropriate, leave an error number in an external integer called calls, when appropriate, leave an error number in an external integer called errno. By using errno, your program can, for example, determine whether Read More...