Recursive Function : Recursive function is a type of function which calls itself in Function Definition Code Segment until a terminating condition reached. In the following program “fact( )” is a recursive function. Use long int in place of int to find factorial of large number like 100 or so on. The power of recursion evidently lies… Read More


When we declare a variable in C/C++ etc. by statements like int a or int b , it tells the compiler to reserve the space of two bytes in the memory to store the integer type value and identify the storage location in the memory by ‘a’ or ‘b’ etc. So every variable has three… Read More


A Simple C++ program to find the length of user entered string.In this program we have used the two properties of Strings 1. The terminating character or end of string marker ‘\0’ and the special property of character array in which character identifier represents the address of first element of the character array(i.e string). #include… Read More


A Simple C Program to Convert the Decimal into Binary equivalent. We have used a While loop, Modulus(%) and Division(/) operator . We have used an Array “ar” to store the Binary Output(remainder) for proper formatting of output. #include int main() { int a=0,b=0,n,i=1,j,k=0; int ar[10]={0,0,0,0,0,0,0,0,0,0}; printf(“\n Enter the decimal number”); scanf(“%d”,&n); while(n!=0) { a=n%2;… Read More