# Category Archives: C Programs

## Draw ellipse in C graphics

Program to draw ellipse in C using graphics.h header file. graphics.h library is used to include and facilitate graphical operations in program. C graphics using… Read More »

## Generating random number in a range in C

How to generate a random number in a given range in C. Examples: Input : Lower = 50, Upper = 100, Count of random Number… Read More »

## C/C++ Program to check whether it is possible to make a divisible by 3 number using all digits in an array

Given an array of integers, the task is to find whether it is possible to construct an integer using all the digits of these numbers… Read More »

## C Program to Check if all digits of a number divide it

Given a number n, find whether all digits of n divide it or not. Examples: Input : 128 Output : Yes 128 % 1 ==… Read More »

## C Program for Find the perimeter of a cylinder

Given diameter and height, find the perimeter of a cylinder. Perimeter is the length of the outline of a two – dimensional shape. A cylinder… Read More »

## C/C++ Program to Find remainder of array multiplication divided by n

Given multiple numbers and a number n, the task is to print the remainder after multiply all the number divide by n. Examples: Input :… Read More »

## C Program for focal length of a spherical mirror

Focal length is the distance between the center of the mirror to the principal foci. In order to determine the focal length of a spherical… Read More »

## C Program for Find sum of odd factors of a number

Given a number n, the task is to find the odd factor sum. Examples: Input : n = 30 Output : 24 Odd dividers sum… Read More »

## Program to find out the data type of user input

Take a input from user and find out the data type of input value. Examples : Input : geek Output : The input is a… Read More »

## Program to calculate area of a Tetrahedron

A Tetrahedron is simply a pyramid with a triangular base. It is a solid object with four triangular faces, three on the sides or lateral… Read More »

## Program to convert given number of days in terms of Years, Weeks and Days

Given number of days, convert it in terms of Years, Week and Days. Examples : Input : 30 Output : years = 0 week =… Read More »

## Menu-Driven program using Switch-case in C

Prerequisite : Switch Case in C Problem Statement: Write a menu-driven program using Switch case to calculate the following: 1. Area of circle 2. Area… Read More »

## C Program for Find largest prime factor of a number

Given a positive integer ‘n'( 1    // A function to find largest prime factor long long maxPrimeFactors(long long n) {     // Initialize the maximum… Read More »

## Program to print ASCII Value of a character

Given a character, we need to print its ASCII value in C/C++/Java/Python. Examples : Input : a Output : 97 Input : D Output :… Read More »

## Program to check if a number belongs to a particular base or not

Given a number N and its radix base R, find whether its valid or not according to its radix base. Find valid/invalid number for any… Read More »