Knowledge is a word which has so many meanings and varies from people to people. But, whatever the extent of knowledge someone has, it is always not enough in this rapidely changing world. Every little thing that we experience in our daily life, contributes to increasing our knowledge. We are reading something in an old newspaper, still we are gaining something. In every little thing or person, there is something to learn!

Let’s read and understand some of the inspirational words of some great people, all centered around the word Knowledge
1) Knowledge is power - by Hobbes
2) Knowledge is the only instrument of production that is not subject to diminishing returns - by J.M Clark
3) That knowledge which purifies the mind and heart alone, is true knowledge; all else is only a negation of knowledge - by Sri Ramakrishna
4) The law of nature is that a certain quantity of work is necessary to product a certain quantity of good of any kind, whatever. If you want knowledge, you must toil for it - by John Ruskin
5) We broaden our field of knowledge and reach generalisations of considerable magnitude as the result of numerous small thoughts brought together in the mind and carefully considered - by Alexander G.Bell
6) Knowledge is of two kinds. We know one subject ourselves or we know where we can get information upon it. - by Dr. Johnson
7) knowledge comes, but wisdom lingers - by Tennyson
Science is organised knowledge - by Herbert Spencer
9) Knowledge is proud that he has learned, wisdom is humble that he knows no more - by Cowper
Do you know any other? I’m sure you may have some great ones too.. Feel free to add to the list :)
Suggested Reading:
=> Secret to your success! Do you have a vision of who you are & who you want to be ?
=> A True Teacher Is An Emperor Whose…
=> Method Of Presentation Of Topics
=> Writing the GP Essay - Write to convince!
- This article is relevant to almost any programming languages, namely C, C++, Java, C#, PHP..etc
- I will be using C++ for example illustrations

The Two Operators Which Create Confusion To Beginners
Before we begin with the title, it is important that you understand the following Operators:
1) The assigment operator
Example:
int x = 10; //This statement assigns the value 10 to variable
Meaning, some memory location will be reserved or set aside, it will be named or referenced as the variable “x”. Then, the value “10″ will be stored in that location.
2) The equality operator
Example:
x == 10; //This is an evaluation statement
Meaning, evaluation will be done to verify if really the variable “x” contains the value “10″. If the location named “x” has a value of “10″, then the statement evaluates to TRUE (1), else it is FALSE (0)
I hope this is clear now? If yes, let’s proceed further..
The Common Programming Error
Consider this piece of C++ Code:
void main()
{ int x=0; //declare a variable x and assign it a value 0 to prevent garbage values//ask the user to input a value
cout << “Enter an integer: “;
//collect the input
cin >> x;//an “if” statement to do something*
if (x = 5) //LOGICAL ERROR!
{ cout << “I knew it was 5!” << endl;
}
else
{ cout << “How can I possibly guess what you entered?” << endl;
}
}//end mainOUTPUT:
Enter an integer: 36
I knew it was 5!
As you can see from the output above, the result is wrong. We entered 36, and still the program is reacting as ‘if it was’ actually 5 that was entered!
What Is Wrong Then?
The “if” statement was there to do something and that something was an “evaluation”.
“if-else” statements always perform one and only one thing: EVALUATION.
Now, I think you are getting the picture; whenever there is an “if-else” statement, there is an “evaluation” and whenever there is an “evaluation”, we use the “equality operator”! (Say this aloud, stick it somewhere on your walls till it becomes natural to your brain)
Further Explanation On the Error
The statement “if (x = 5)”, will always return a TRUE value. This is because an if statement is FALSE, if and only if, that statement evaluates to 0. In our case, the statement says, x=5. Hence, x is not 0. Therefore, if() evaluates to TRUE.
That is why the code body of the “if” statement will still get executed although this is not what we ‘intended‘ the program to do.
NOTE:
This type of error is called a “logical error” and is one of the worse error in programming since there is no way for the compiler to catch that error for you!
Compile-time errors are caught!
Run-time errors are also caught!
But, logical errors can never be caught! So be careful! ![]()
(I think now after reading the above, you will never ever make such an error)
The Full Correct Code:
void main()
{ int x=0; //declare a variable x and assign it a value 0 to prevent garbage values//ask the user to input a value
cout << “Enter an integer: “;
//collect the input
cin >> x;//an “if” statement to do something*
if (x == 5) //GOOD!
{ cout << “I knew it was 5!” << endl;
}
else
{ cout << “How can I possibly guess what you entered?” << endl;
}
}//end mainOUTPUT:
Enter an integer: 36
How can I possibly guess what you entered?
If you liked this article, do subscribe to not miss other exciting tutorials ![]()
And I would also love to hear your feedback, point of view or any suggestion.
Recommended Reading:
=> Random Numbers in C programming
Here’s the third batch of Review My Blog and Get A Free Linkback:
2) Blog Badly presents Bad Blog Reviews: Wakish Wonderz
Sorry for the lateness, it was because I was busy with My Final Custom Made Wordpress Theme
PS: I wonder what he now thinks of my new own made theme?
So, you want to have your site, blog or forum figured FREELY on my PR4 Blog? To take this golden chance, read and respond to Review My Blog and Get A Free Linkback
Previous Edition:
=> Get A Free Linkback - Batch 01
=> Get A Free Linkback - Batch 02
Did you know.. Sun Radiation
Only a very small portion (0.000 000 0005%) of the radiation emitted by the Sun reaches the Earth..

Image provided by The Climate Guide which presents a very nice informative article on Radiation from Earth (Make sure you read it
)
Previous Editions:
=> Did you know.. - Universe Edition 1
=> Did you know.. - Universe Edition 2
=> Did you know.. - Universe Edition 3
I did not mind overlooking one mistake
A labourer found a shortage of $10 in his pay envelope and complained to the cashier..
“You were overpaid $10 last time and didn’t object“, the cashier responded.
“I know“, replied the first man,
“I didn’t mind overlooking one mistake, but when it happened a second time I thought I should complain“.
Previous Editions:
=> Little Johnny - Wakish Wonderz Fun Time/Edition 1
=> Gambler’s Prayer - Wakish Wonderz Fun Time/Edition 2
=> Ex-Husband - Wakish Wonderz Fun Time/Edition 3
Enjoy! ![]()

