Skip to content

Programming Articles

  • HOME
  • Python
  • JavaScript
  • C/C++
  • Java
  • Terms & Conditions and Privacy Policy
  • About US
Main Menu

C Examples

C Examples / Examples

C program for binary search

This C program performs binary search in an array. It prints the position of the element in the array if the searched element is present in the array, else prints …

C program for binary search Learn More
C Examples / Examples

Linear search in C

C program to perform linear search in an array of numbers. It prints the location of the element in the array if the searched element is present in the array, …

Linear search in C Learn More
C Examples / Examples / Patterns

C program to print diamond of asterisks

This C program prints a pattern which looks like a diamond, using asterisks (*). The user enters the number of rows as input and the program prints a diamond of …

C program to print diamond of asterisks Learn More
C Examples / Examples

C program to find and print Armstrong numbers

This C program finds and prints Armstrong number between two numbers. This example prints Armstrong numbers from 1 to a number entered by the user. Armstrong number: A number is …

C program to find and print Armstrong numbers Learn More
C Examples

C program to swap two numbers

This page contains C program to swap two numbers without using third variable, C program to swap two numbers using pointers and C program to swap two numbers using third variable and function,,,

C program to swap two numbers Learn More
C Examples / Examples

C program to check whether the entered number is palindrome or not

This C program takes a number as input from the user and then checks whether the entered number is palindrome or not. Palindrome number: A number which reads same forwards …

C program to check whether the entered number is palindrome or not Learn More
C Examples / Examples

LCM and HCF of two numbers in C

This is a C program to calculate and print the LCM and HCF or GCD of two numbers. Program takes two numbers as input from the user and then calculates …

LCM and HCF of two numbers in C Learn More
C Examples / Examples

Calculator using switch-case in C

This is a C program to create a simple arithmetic calculator using switch-case statements. It takes two numbers and an operator as input from the user and then performs the …

Calculator using switch-case in C Learn More
C Examples / Examples

Simple calculator in C

This program creates a simple arithmetic calculator using if-else statements. It takes two numbers and an operator from the user as input and then performs the chosen operation on those …

Simple calculator in C Learn More
C Examples / Examples

C program to print Pascal’s triangle

This C program accepts the number of rows from the user as input and then prints Pascal’s triangle with the number of rows provided. Program: Pascal’s triangle in C Output: …

C program to print Pascal’s triangle Learn More
C Examples / Examples

C program to calculate simple and compound interest

This C program takes principal amount, yearly rate, and time as input, then calculates the simple interest and compound interest for the same data and prints them. Basic Mathematics: Formula …

C program to calculate simple and compound interest Learn More

Posts navigation

Previous 1 2

Featured Posts

From UNIX to Linux – History of Linux

21st November 202010th September 2022

Best themes for Ubuntu: Make Ubuntu Beautiful

20th October 202010th September 2022

Strings in Python

12th September 202010th September 2022

Is Python hard to learn? Top best learning resources

18th April 202010th September 2022

Recent posts

  • How to pad a string with zeroes to the left?
  • What is the difference between process and thread?
  • How to generate a random alpha-numeric string in Java?
  • How to auto-resize an image to fit a ‘div’ container?
  • How to get a Docker container’s IP address from the host?
  • How to display a JavaScript object?
Copyright © 2023 Programming Articles.
Powered by WordPress and HitMag.