Skip to content
The Computer Science
TheCScience
  • Engineering Subjects
    • Human Values
    • Computer System Architecture
    • Digital Communication
    • Internet of Things
  • NCERT Solutions
    • Class 12
    • Class 11
  • HackerRank solutions
    • HackerRank Algorithms Problems Solutions
    • HackerRank C solutions
    • HackerRank C++ problems solutions
    • HackerRank Java problems solutions
    • HackerRank Python problems solutions
The Computer Science
TheCScience

C, C++, Java Programming Programs for Practice

Welcome to our collection of C, C++, and Java programming programs for practice—a dedicated space designed to help learners strengthen their coding fundamentals and problem-solving skills.

Whether you are a beginner starting with basic syntax or an intermediate programmer looking to sharpen your logic, these programs cover a wide range of concepts, from simple input/output and control statements to functions, arrays, object-oriented programming, and algorithms. Each program is crafted to encourage hands-on learning, making it easier to understand core programming principles and build confidence through practice.

If you want any other program on any programming language then please reach out to use with your topic name and programming language name.

100+ C Programs
The First C Program
Reading Input in a C Program
Compiling C Programs
C Program to read a number and print the factorial
C Program to Print the Sum of N Natural Numbers
C Program to Print Factorial of any Given Number
C Program to Check a Prime Number or Not
C Program to Print the Power of a Given Number
C Program to Print Factors of a Given Number
C Program to Print Factorial using Recursion
C Program to find gross salary
C Program to Reverse a Given Number
C Program to Swap Two Numbers without Using a Third Variable
C Program to Calculate the sum of subjects and find the percentage
C Program to convert temperature from centigrade to Fahrenheit
C Program to find simple interest
C Program to find the area and circumference of a circle
C Program to find the sum of two numbers
C Program to find the sum of two matrices
C Program to find even/odd numbers
C Program to display a matrix
C Program to show the use of the conditional operator
C Program to find the maximum number in an array
C Program to find the greatest of 3 Numbers
C Program to show the sum and average of 10 elements of an array
C Program to print a table of any number
C Program to add two numbers using pointers
C Program to use the bitwise AND operator between the two integers
C Program to display an odd number series and find the sum
C Program to display the sum of the harmonic series
C Program to print the Fibonacci series up to 100
C Program to print a star pattern in a pyramid shape
C Program to print a star pattern in a reverse triangle shape
C Program to print a star pattern in a triangle shape
C Program to display the first 10 natural numbers and their sum
C Program to display arithmetic operations using a switch case
C Program to display weekdays using a switch statement
C Program to find the subtraction of two matrices
C Program to shift input data by two bits to the left
C Program to find occurrences of vowels, consonants, words, spaces and special characters in give sentence
C Program to merge two arrays, excluding the repeating elements
C Program to perform file operations
C Program to find a palindrome number
C Program to find the largest of two numbers using the function
C Program to show call by reference
C Program to show call by value
C Program to show a table of numbers using a function
C Program to find the factorial of a number using a function
C Program to swap two numbers using a function
C Program to find the square of a number using a function
C Program to show input and output of a string
C Program to print the powers of 2 tables for the powers 0 to 20
C Program to find the maximum number in an array using a pointer
C Program to print the multiplication table
C Program to find the transpose of a matrix
C Program to evaluate the equation y=xn
C Program to find the multiplication of two matrices
C Program to display months using enum
C Program for finding the largest number in an array
C Program for sorting the elements of an array in descending order
C Program to count the number of students in each group
C Program to evaluate a square expression and its sum
C Program for plotting of two functions
C Program of minimum cost problem
C Program to draw a histogram
C Program to print a binomial coefficient table
C Program to read a line of text
C Program to illustrate the use of the continue statement
C Program to read a string using the scanf() function
C Program to evaluate the geometric progression series
C Program for production and sales analysis
C Program to illustrate the use of the break statement
C Program to evaluate response to a multiple-choice test
C Program to print the total marks obtained by a student
C Program to calculate standard deviation
C Program to sort a list of numbers and to determine the median
C Program for finding the desired kth smallest element in an array
C Program for removing duplicate elements in an array
C Program to use functions with no arguments and no return values
C Program to sort a customer list in the alphabetical list
C Program for counting characters, words, and lines in a text
C Program to sort a list of names in alphabetical order
C Program to calculate the square and cube by using a function as an argument
C Program to use string handling functions
C Program to return only absolute values
C Program to concatenate a string
C Program to pass arguments to a user-defined function by value/reference
C Program to print the Character and Decimal value of alphabet
C Program to return more than one value from a user-defined function
C Program to count the number of characters copied into a string
C Program to show the use of user defined function
C Program to use global variables on different functions
C Program to use similar variables in different functions
C Program to define & call user-defined functions
C Program to call a user-defined function
C Program to find the power of a value using a function
C Program to use functions with arguments and return values
C Program to use functions with arguments but no return values
C Program to use the ++ operator with the return value of a function
C Program to perform multiplication and division of numbers
C Program to perform addition and subtraction of numbers
C Program to assign the return value of a function to another variable
C Program to call the function through a for loop
C Program to call the user-defined function through the switch() statement
C Program to call the user-defined function through an if statement
C Program to evaluate the function equation s = sqr(a() + b())
C Program to use modulo % with a function
Student marksheet program in C programming

C++ Programs for Practice
C++ Program to print a message on the screen
Project – Library Management System Program in C++
C++ Program to calculate the salary of the servant
C++ Program to find out the grades of given marks
C++ Program to find out the greater number from given numbers
C++ Program to find out whether the given number is odd or even
C++ Program to inherit derived constructor
C++ Program to display the reverse of a given number
C++ Program to print the ASCII value of a character
C++ Program to convert temperature from Fahrenheit to centigrade
C++ Program to enter two numbers and show their sum
C++ Program to swap two numbers using third variable
C++ Program to calculate the result of students using marks
C++ game to find out a number
C++ Program to print the table of a number
C++ Program to find out the smallest number from given numbers
C++ Program to calculate the factorial of a given number
C++ Program to select an operation from a list and display its results
C++ Program to generate a random number in circles and find out the sum
C++ Program to solve arithmetic operations
C++ Program to convert the dollar into different currencies
C++ Program to display the given number in roman number
C++ Program to find out whether the given character is a vowel or not
C++ Program to use symbols as words using preprocessor Directives
C++ Program to calculate the age of a human by entering the date of birth
C++ Program to convert the upper to lower and lower to upper case letters
C++ Program to calculate the electricity bill of consumed units by the user
C++ Program to convert the small case letters to upper case letters
C++ Program to find out the nth term of its factorial
C++ Program to search for a number from a list by sequential search
C++ Program to find out the exponent of a given number
C++ Program to sort characters in ascending order by using bubble sort
C++ Program to display the text in different colours
C++ Program to convert the decimal number into a binary number
C++ Program to find out the day of the given date, starting from Jan 2001
C++ Program to find out the maximum number from an array
C++ program to display the ASCII values
C++ Program to calculate the area of a room
C++ Program to print students’ details using a structure
C++ Program to display a stopwatch on screen for 2 minutes
C++ Program to print a diamond pattern of stars
C++ Program to display the pattern of alphabets
C++ Program to find out the factors of a given number
C++ Program to display the sum of mathematics series
C++ Program to create a game [Find Hidden Word]
C++ Program to display the rectangle on the screen
C++ Program to sort the numbers using selection sort
C++ Program find out whether the given number is prime or not
C++ Program to sort the numbers using insertion sort
C++ Program to display a word in the middle of the screen
C++ Program to create a puzzle game
C++ Program to find out Armstrong numbers from 1 to 500
C++ Program to compare two strings
C++ Program to calculate the number of characters in the given string
C++ Program to calculate the standard deviation of a given range
C++ Program to open a file in binary mode and then get data in that file
C++ Program to use the setw function
C++ Program to create a file in binary mode and then put data in that file
C++ Program to display the Fibonacci series using a function
C++ Program to count the characters, tabs, and vowels in a line from a file
C++ Program to find out the raise to a power using recursion
C++ Program to copy data from one file to another file
C++ Program to find out the prime numbers from a given range
C++ Program to count the number of lines in a file
C++ Program to calculate the square root of a given number
C++ Program to copy a string into a file, then read it and display it on the screen
C++ Program to print the values of a pointer character array
C++ Program to create a file in text mode, write and then read data from the file
C++ Program to access the value of a variable using a pointer
C++ Program to use a friend class
C++ Program to display the address of a variable
C++ Program to display the distance in feet and inches
C++ Program for Matrix Multiplication
C++ Program to use a destructor
C++ Program to create user define header file
C++ Program to calculate the multiplication of two numbers without using the * symbol
C++ Program to find out the smallest number from the given numbers
C++ Program to search a record from a file
C++ Program to search a record from a binary file
C++ Program to open a file in binary mode and count the total records
C++ Program to inherit the class
C++ Program to overload binary operators
C++ Program to overload [] binary operator
C++ Program for binary operator overloading
C++ Program to display the file using the command line of the compiler
C++ Program to update the record in binary mode
C++ Program to search the record in binary file
C++ Program to display a message by using multiple virtual functions
C++ Program to display a message by using a virtual function
C++ Program to multiply three numbers using a friend function
C++ Program to override a function

100+ Java Programs for Practice
Simple Java Program Example
Java Program to compare two numbers using if-else
Java Program for the Addition of Two Numbers
Java Program for Subtraction of Two Numbers
Java program to print fibonacci series
Java Program to check a prime number
Java Program to print N prime numbers
Java Program to check a palindrome number
Java Program to Print Student Marksheet
Java Program using Static variable and method
Java Program using an interface
Java Program to print the sum of command line arguments
Java Program for Handling an Exception
Java Swing program to calculate the square of a number
Java Program to use the equal function
Java Program to handle an action event
Java Program using a constructor
Java Program to print shapes using an applet
Java Program to generate random numbers between 1 and 100
Java Program for Method Overloading
Java Program using switch case
Java Program using an abstract class
Java Program to find the sum and product of the digits of a number
Java Program to find the sum of integers divisible by 7
Java Program to concatenate a string using a for loop
Java Program to display a multiplication table
Java Program to swap two values
Java Program to convert days into months
Java Program to find an Armstrong number
Java Program to print characters of integers
Java program to generate the Harmonic series
Java Program to find the average of consecutive N odd and even numbers
Java Program to take command-line arguments
Java program to use a class and an object
Java program using conditional operators
Java program to use this keyword
Java program using a double variable
Java program to use the super keyword
Java program to use a nested switch case
Java Program to check for a leap year
Java Program to print factorial
Java Program to print a list of even numbers
15+ Pattern programs in Java
Java Program to print FLOYD’S TRIANGLE
Java Program to print a star pattern in a square shape
Java Program to print a pyramid of numbers using a for loop
Java Program to print Even number between a range
Java Program to print the Fibonacci series using an array
Java Program to print a star pattern in a pyramid shape
Java Program to check if a list of numbers is a palindrome
Java program to print a star pattern in a reverse pyramid shape
Java program to print prime numbers between given range
Java Program to print a star pattern in a diamond shape
Java Program to print factorial using recursion
Java Program to calculate the area of a circle using radius
Java program to print a star pattern in a triangle shape
Java Program to print a star pattern in a reverse triangle shape
Java Program to print a number pattern in a triangle shape
Java Program to print a number pattern in a reverse triangle shape

Select your Subject

TheCScience

We at TheCScience.com are working towards the goal to give free education to every person by publishing in dept article about Secondary, Senior-Secondary, and Graduation level subjects.

Pages

About US

Contact US

Privacy Policy

DMCA

Our Tools

Hosting - get 20% off

Engineering Subjects

Internet of Things

Human Values

Digital Communication

Computer System Architecture

Programming Tutorials

Data Structure and Algorithm

C

Java

NCERT

Class 12th

©2026 TheCScience | WordPress Theme by SuperbThemes