Virtual Memory Frames and their physical address Page Fault Thrashing
Author: vamsipavan
Avoid multiple inclusion of header file
Generally, a header (.h) file should have (A header file need not have a .h extension, its just a convention): 1. Macro definitions (preprocessor #defines). 2. Structure, union, and enumeration declarations. 3. Any typedef declarations. 4. External function declarations. 5.Continue reading… Avoid multiple inclusion of header file
Floating point representation, IEEE standard
IEEE Standard 754 floating point is the most common representation today for real numbers on computers, including Intel-based PC’s, Macintoshes, and most Unix platforms. IEEE floating point numbers have three basic components: the sign, the exponent, and the mantissa. TheContinue reading… Floating point representation, IEEE standard
Fibonacci numbers
f(n) = (1/sqrt(5)) * (((1+sqrt(5))/2) ^ n – ((1-sqrt(5))/2) ^ n) a Number N is fibacci number iff 5*N*N+4
Interview questions
Linked Lists Given only a pointer to a node to be deleted in a singly linked list, how do you delete it? Write a C program to implement a Generic Linked List. How would you detect a loop in aContinue reading… Interview questions
Online links for eBooks
free ebook downloads flazx.com holyplanets.com http://ftp.anyhost.ru/books/www.krf.bsu.by/ Placement questions http://www.cracktheinterview.com/adfaqpublish.html Latex Using ttf fonts with latex http://www.radamir.com/tex/ttf-tex.htm Online C reference Programming in C UNIX System Calls and Subroutines using C. http://www.cs.cf.ac.uk/Dave/C/ Probability of Theory: The logic of science Statistical Natural LanguageContinue reading… Online links for eBooks
Bit wise operators
Bit wise operators and % operator cannot be applied to float fmod() is to find modulus for float as % is for int but it needs math.h; This can be used to detect whether a given number is an integerContinue reading… Bit wise operators
English corpus
Vocab size
conditional compilation, preprocessor expression
#if something == 0 int some=0; #endif main(){ int thing = 0; printf(“%d %dn”, some ,thing); } Answer 0 0 Explanation This code is to show that preprocessor expressions are not the same as the ordinary expressions. If a nameContinue reading… conditional compilation, preprocessor expression
Lifetime and visibility of a variable
main(){ int *j; { int i=10; j=&i; } printf(“%d”,*j); } Answer: 10 The variable i is a block level variable and the visibility is inside that block only. But the lifetime of i is lifetime of the function so itContinue reading… Lifetime and visibility of a variable