C and C++ Programs

Sequential: Simple Logic Programs

Sum of two entered numbers

Average of three entered numbers

Simple interest

Total and Percent

Swapping values of two variables

Swapping without using third variable

Celsius to Fahrenheit conversion

Find area and circumference of circle

Branching: Selection Logic & Decision Making Programs

Absolute value of number (simple if)

Checking odd or even number (if else)

Checking leap year (if else)

Greater in two numbers (if else)

Finding grade from percent (else if ladder)

Total percent and division (else if ladder)

Greatest in three numbers (nested if)

Simple calculator program (switch case single case)

Switch between Mon to Sun (switch case single case)

Checking vowel or consonant (switch case multiple case)

Number of days in a month (switch case multiple case)

Looping: Iteration Logic or Repetition Logic Programs

Generate series of natural numbers (while, for, do while)

Generate series of natural numbers and their sum

Generate series of odd numbers and find their sum

Generate series of even numbers and find their sum

Generate table of given number

Find factorial of given number

Find power of given number

Generate multiplication table of given number

HCF and LCM of two numbers

Generating Fibonacci series

Checking prime number

Generating series of prime numbers

Sum of digits of given number

Reverse of digits of given number

Checking palindrome number

Checking Armstrong number

Generating series of Armstrong numbers

Convert decimal to binary

Convert binary to decimal

ASCII: Programs related to ASCII Table

Find ASCII values of a character

Convert lowercase to uppercase

Convert uppercase to lowercase

Pointer Example Programs

Declaration and assignment of pointer

Pointer to pointer

Array Example Programs

Declaration and initialization of array

Input-output in array

Sum and average of array elements

Transpose of Matrix

Addition of two matrix

Multiplication of two matrix

Union Example Programs

Declaration and initialization of union

Structure Example Programs

Declaration and initialization of structure

Array of structure

String Example Programs

String input-output without space

String input-output with space

Function Example Programs

Sum of two numbers using function

Average of three numbers using function

Swapping using function call by value

Swapping using function call by reference

File Example programs

Writing to a file in C

Reading from a file in C

Appending to a file in C

Reading all data from a file in C

Pattern/Series Printing/Generating Programs

Asterisk Star Patterns

Alphabet Letter Patterns

Number Digit Patterns