CPP Program For Armstrong Number
The sum of the cube of individual digits of a number is equal to the number itself is called Armstrong number. #include<iostream.h> #include<conio.h> void main() { clrscr(); int a,n,rev=0,x; cout…
The sum of the cube of individual digits of a number is equal to the number itself is called Armstrong number. #include<iostream.h> #include<conio.h> void main() { clrscr(); int a,n,rev=0,x; cout…
A Palindrome number is that type of number when we reverse the number it remains the same. eg: 12321 A user is asked to enter a number then we will reverse…
A simple program to find out the diagonal matrix. A diagonal matrix is that type of matrix which has non-zero elements in the diagonal only. #include<iostream.h> #include<conio.h> void main() {…
sizeof is a keyword. It determines the size in bytes of variables and datatypes as seen in the example. #include<iostream.h> #include<conio.h> void main() { clrscr(); cout << sizeof(int) << endl;…
A simple Program to find the length of the string without using the predefined string function. This will not count the null character. #include<iostream.h> #include<conio.h> void main() { clrscr(); int…
1. strlen() - This function returns the length of the string as seen in the output. This function does not return the null character(if there is space between strings it…
Do while loop condition fails: one output when we use do while loop it gives us an advantage that even the condition fails it gives at least one initial output…
Destructor: Destructor is a member function of a class. It has the same name as a class but followed by a tilde sign (~). It does not have any return…