Writing Factorial program in java

In mathematics, the factorial of any non-negative number let’s say X, is denoted by X! , which is equal to the product of all positive integers less than or equal to...

4 Big Mistakes to Avoid When Learning Programming

Here are the 4 big mistakes which you have to avoid while learning programming. 1) Fear and self doubt: I have put this in the first place because it's the...

Thread Programming In java

Thread programming in java is concerned with how system utilizes its resources. Friendly interface, computations and other intensive tasks can take up a lot of processor time. A java program that...

Increment operator overloading in C++

Increment operator in C++ is used to increase the value of a variable by 1 or some other fixed interval. normally it is used in loops. Now increment operator overloading is...

Decrement operator overloading in C++

Decrement operator in C++ is used to decrease the value of a variable by 1 or some other fixed interval, normally it is used in loops. Now decrement operator can be...

Pointers in C++

Pointers in C++ are the variables that contain memory addresses as their values. Normally, a variable directly contains a specific value. A pointer contains the memory address of a variable that,...

Overloading steam insertion and extraction operators in C++

For putting data into the stream and getting data from the stream, the stream insertion and extraction operators are used, Now these operators are already defined for defined datatypes in C++,...

Object Oriented Programming and Databases

Programming itself evolved from several stages and now we have Object Oriented Programming as the most mature and popular approach. On the other hand, interaction with database has always been tricky...

Assignment Operator Overloading in C++

After we do assignment operator overloading, we will then be able to assign two variables of our self-defined datatypes. Lets have a look at the below example: // Operator overloading in C++ //assignment operator overloading #include<iostream> using namespace std;   class Employee { private:     int idNum;     double salary; public:     Employee ( ) {         idNum = 0, salary = 0.0;     }       void setValues (int a, int b);     void operator= (Employee&emp );   };   void Employee::setValues ( int idN , int sal ) {       salary = sal; idNum = idN;   }   void Employee::operator = (Employee&emp)  // Assignment operator function {     salary = emp.salary; }   int main ( ) {       Employee emp1;     emp1.setValues(10,33);     Employee emp2;     emp2 = emp1;        // emp2 is calling object using assignment operator   } Now lets explain this...

Finding Length of a string in C++

Sometimes we have strings entered by the user and we need to find out the length of a string or size of that length of a string to be used further....