Numbers Divisible by 7 in C – List, Count, and Sum

Finding all integers in a range that are divisible by a given number is a classic loop exercise. The key tool is the modulo operator % — if i % 7 == 0, then i is exactly divisible by 7 with no remainder. This post shows two programs: one for the classic 100–200 range, and …

C Program to Find the Sum of Even and Odd Numbers

Given a list of integers, separate them into two groups — even numbers (divisible by 2) and odd numbers (not divisible by 2) — and report the sum and count of each group. This is a classic array-scanning problem that demonstrates the modulo operator, accumulator variables, and loop-based input. The original post had no code; …

String Concatenation in C – Custom Function and strcat

String concatenation in C joins two strings end-to-end into a single result. The standard library provides strcat() for this, but writing it manually teaches how C strings work: they are null-terminated char arrays, and concatenation means walking to the end of the destination string then copying source characters one by one until the null terminator. …

C Program to find the squares and cubes of a two digit odd number.

This C program prints the square and cube of every two-digit odd number — that is, the odd numbers from 11 to 99. A number is odd if it is not divisible by 2 (n % 2 != 0). Two-digit odd numbers begin at 11 (the smallest two-digit odd) and end at 99. The original …

C Program to Evaluate sin(x) Taylor Series

The sine function can be computed from scratch using its Taylor series expansion: sin(x) = x − x³/3! + x⁵/5! − x⁷/7! + x⁹/9! − … Each term alternates in sign and uses an odd power of x divided by the corresponding factorial. As you add more terms, the partial sum converges toward the true …

C Program To Find The Roots Of Quadratic Equation

A quadratic equation has the form ax² + bx + c = 0, where a ≠ 0. Its roots are found with the quadratic formula: x = (−b ± √(b²−4ac)) / 2a. The value under the square root — b²−4ac — is called the discriminant (D) and determines what type of roots exist: Discriminant Roots …