As we also talked before that the less numbers of variables in the program means less memory used by the program and in return the program also run faster. So it;s always best to reduce the number of variables used in the program, as to increase the execution time of the program.
In this post we are going to make the program to calculate sum of two integers using only a single variable. We will achieve this by making a function.
Let’s have ah Look The Program ►► Continue reading C Program to Calculate Sum using only One Variable
Every programmer is familiar to the function printf(); but there is also many things, everybody dons know.
Let’s Try to Predict the output of the program ►► Continue reading What Will be the Output of the following C Program
We all know, the number which can divide from 2 completely, means if the reminder is zero, then the number is even and which cannot are odd numbers.
The same we will do in our program to know whether the number, which is input through the keyboard, is even or odd.
Remember the modulus operator (%), this operator returns the reminder, when dividing any number. So we will condition the if statement, if the reminder is zero after diving the number by 2, then the number is even otherwise odd.
Let’s have ah Look The Program ►► Continue reading C Program to Find Whether the Number is Even or Odd
We all know, every statement in C is terminated by semicolon (;). The same apply to printf(); function.
Suppose we are going to print Lightning Code on the screen than statement for it will be printf(“Lightning Code”); but what if we want to print it without the semicolon after printf. Think about it, how can you do it, I know, you know how can but you did’t notice it.
Let me give you a hint, when we use if(); statement to condition something, we never use the semicolon inside the parenthesis. Now I am sure you make it out.
Let’s Have Ah Look at Program ►► Continue reading C Program to Use Printf(); Function Without The Semicolon
Hello Readers 🙂 Hope you are getting valuable posts. If you have any query or want to know about any program, Let Me Know, I’ll love to help you out. And Keep Learning.
Now I am going to write a program to find the factorial of a number. Factorial of a number is the multiplication of all numbers lower than it and greater than zero as factorial of 5 will be 5*4*3*2*1=120.
Let’s Make The Program ►► Continue reading C Program to Find Factorial of a Number
As Ih told you about Fibonacci Series in my previous post. Here I am writing the program to print Fibonacci Series Using Recursion. Recursion is a technique in which function call itself. A program that calls itself is called recursive program.
Look at the Program ►► Continue reading C Program to Print Out Fibonacci Series Using Recursion
Really for coding one also must learn the Mathematics. There are many programs out there which are totally based on mathematics questions. And I hate maths 😦 Love to coding only 😉
Well Let Face It. Lets make a program to print out Fibonacci series up to N terms. A series of numbers in which each sequent number is sum of its two previous numbers is known as Fibonacci series and each numbers are called Fibonacci numbers.. For example we have to print up to 5 then the series will be 0,1,1,2,3, here every number is the sum of last two numbers.
Lets Have ah Look at the Program ►► Continue reading C Program to Print Out Fibonacci Series upto N Terms