Thursday, November 10, 2011

Constant Pointers & Pointer to Constant


1) Constant Pointers : These type of pointers are the one which cannot change address they are pointing to. This means that suppose there is a pointer which points to a variable (or stores the address of that variable). Now if we try to point the pointer to some other variable (or try to make the pointer store address of some other variable), then constant pointers are incapable of this.

A constant pointer is declared as : 'int *const ptr' ( the location of 'const' make the pointer 'ptr' as constant pointer)

2) Pointer to Constant : These type of pointers are the one which cannot change the value they are pointing to. This means they cannot change the value of the variable whose address they are holding.

A pointer to a constant is declared as : 'const int *ptr' (the location of 'const' makes the pointer 'ptr' as a pointer to constant.

Thursday, September 29, 2011

Linux Command - How to find a file


find -name test.cpp
This will searh test.cpp in the current folder and its sub directories.

find . -name foo\*bar
This will search from the current directory down for foo*bar (that is, any filename that begins with foo and ends with bar).

Thursday, August 04, 2011

How to increase Hard disk size in VMWare Virtual machine

How to add new hard disk / Increasing hard disk size in VM Ware virtual machine.

Here is the link to know,