Monday 14 November 2011

Some Research on words

Dismay is a feeling of discouragement and unhappiness .you are in dismay when some one scolds(berates) you ignominiously (causing disgrace ) 

  • protract -lasting for a long time .we can always protract negotiations  .When we want to extend our negotiations ,we will call it protracting the negotiations .We protracted our stay by few more days .
  • When you are angry ,you may speak severely to someone ,because they have done something wrong .this is called reprimand .

The power of Adjectives

  • a plebeian outlook on life means that you have a ordinary or common outlook on life .If you want to describe something as ordinary and undistinguished and common ,just like a person lacking imagination call it as plebeian .
  • Obsequious attentions of the headwaiter .An act that indicates overattentive 
  • a maudlin motion picture ,something which is emotional and sentimental 
  • An Inane remark -Something which is meaningless or which lacks significance .
  • A flagrant misuse of company funds -You have misused the company funds so much ,that it cannot be ignored 

Sunday 13 November 2011

Words about your Feelings

1.Nostalgia
2.Satiated-Filled Beyond natural desire
3.Benevolence -Desire for the welfare of others
4.Frustration
5.Lethargy

Examples - the large dinner left him satiated (I am done with the dinner) .That was the time when he thought it was better to be benevolent (I should have shared my food )


Monday 13 June 2011

Difference between signed integers and unsigned integers


A signed integer is one with either a plus or minus sign 
in front. That is it can be either positive or negative.
An unsigned integer is assumed to be positive.

This is important in computing because the numbers are
stored (usually) as a fixed number of binary digits. For
a signed integer one bit is used to indicate the sign
- 1 for negative, zero for positive. Thus a 16 bit signed
integer only has 15 bits for data whereas a 16 bit unsigned
integer has all 16 bits available. This means unsigned
integers can have a value twice as high as signed integers
(but only positive values).

Operator Overloading

If we can use operators like +,/,*,- for common data types like int ,float ,etc ,then why can't we use them for the data types defined by the users ???
That is the main concept behind operator overloading.We can redefine the way in which c++ works .

Shell Sort with 7 Elements



#include "shellsort.h"


using namespace std;


int main(void)
{
int array[7]; // An array of integers.
int length = 7; // Length of the array.
int i, d;
int tmp, flag;


//Some input
for (i = 0; i < length; i++)
{
cout << "Enter a number: ";
cin >> array[i];
}


//Algorithm
d = length;


flag = 1;


while ( flag || (d > 1))  /*1 OR d>1 */
{
flag = 0;


d = (d + 1)/2;


for (i =0; i < (length - d); i++) {   /*i=0; i < 7 - 3=4; i++*/

if (array[i + d] > array[i]) {


tmp = array[i+d];


array[i + d] = array[i];


array[i] = tmp;


flag = 0;
}
}
}


cout<<"\nAfter Sorting.....\n";


//Some output
for (i = 0; i < 7; i++)
{
cout << array[i] << endl;
}


getch();
}