Skip to main content

Posts

Showing posts from June, 2013

The Switch Vs If-Else

The switch and if-else both are selection statement and they both let you select an alternative out of given many alternative by testing an expression.

Scope : Local And Global

From the computer’s point of view, a C program is nothing more than a collection of functions and declarations. Functions can be thought of as sealed capsules of program code which float on a background of white space,and are connected together by means of function calls. White space is the name given to the white of an imaginary piece of paper upon which a program is written, in other words the spaces and new line characters which are invisible to the eye. The global white space is only the gaps between functions, not the gaps inside functions. Thinking of functions as sealed capsules is a useful way of understanding the difference between local and global objects and the whole idea of scope in a program.