Category Archives: C Programs using Loop Iteration Statements

C String Program Remove Blank Spaces

C Program Remove Blank Spaces from a given string entered by the user at run time. Code /* C Program to removing blank spaces from string easyCodeBook.com */ #include <stdio.h> int main() { char str1[100], str2[100]; int i, j, size = 100; printf(“Enter a string to remove spaces:\n”); gets(str1); j=0; for(i=0; str1[i] != ‘\0’; i++)… Read More »

Loading

4 C Programs Find GCD and LCM

Topic: 4 C Programs Find GCD and LCM The Greatest Common Divisor – GCD The greatest common divisor (GCD) of two integers is the largest positive integer dividing both. In mathematics, the greatest common divisor (gcd) of two or more integers, is the largest positive integer that divides each of the integers. For example, the… Read More »

Loading

C ++ Program Alphabet Triangle Pattern

C Plus Plus Program Alphabet Triangle Pattern Task: Write down a C++ Program to display Alphabet Triangle Pattern. The user will enter the height of triangle. Then the program will show a right angle triangle of alphabets in Capital letters. How Alphbets Triangle Program Works This program uses nested for loops to display the required… Read More »

Loading

C Program to Find Smallest Number in Array

Q: Write a C Program to Find Smallest Number in Array The Basic Logic of Smallest Number in Array Program First of all the user will input any 5 numbers in array. The program assumes that the first number is minimum number min = numArray[0]; This C program uses a for loop to get each… Read More »

Loading

Fibonacci Program in C Programming

What is Fibonacci Sequence Explain Fibonacci Series What are Fibonacci Numbers This program with title “Fibonacci Program in C Programming” is based on a special series in mathematics. The Fibonacci sequence is a series of numbers starting from first two numbers 0 and 1 by definition. Then every other number is the sum of  previous… Read More »

Loading