C Programs

This website offers C programming solved programs with solutions; on each topic, we provide the most significant programs. It can be used to create software such as operating systems, databases, and compilers.

Tower of Hanoi Program in C

It comprises of three rods and a variety of discs that may slide onto any rod and come in various sizes. The problem begins with the discs neatly stacked on one rod in decreasing order of size, with the smallest at the top. On the third rod, we need to get the same stack. One …

Tower of Hanoi Program in C Read More »

isalpha in C

Isaplha in c program for beginners. An alphabetic character is determined using the isalpha() function. The isalpha() function in C programming determines if a letter is an alphabet (from a to z and A-Z) or not. isalpha() delivers a non-zero integer if a character it receives is an alphabet; otherwise, it returns 0. Ctype Function …

isalpha in C Read More »

Automorphic Number in C

Automorphic number in c for beginners. A number is said to be automorphic if its square equals the supplied number, for example, (25)2 = 625 and (76)2 = 5776. Square Function in Automorphic Number Math. h header file contains a definition for the sqrt() . You may explicitly convert a data type to double using …

Automorphic Number in C Read More »

Dangling Pointer in C

Dangling Pointers are those pointers that point to a deallocated memory block. The Dangling Pointer Problem error is caused by this circumstance. When a pointer referring to a variable exits its scope or when memory for an object or variable is deallocated, a dangling pointer is created. What is Dangling Pointer A pointer is a …

Dangling Pointer in C Read More »

Transpose of a Matrix in C

You may get the transpose of a matrix by turning rows into columns or columns into rows. The letter “T” signifies the matrix’s transposition in the superscript of the given matrix. For example, if “A” is the supplied matrix, then the transposition of the matrix is represented as A’ or AT. Matrix “flipping” across its …

Transpose of a Matrix in C Read More »

Menu Driven Program in C

In a software with a menu structure, the user is presented with a list of options (the menu) and prompted to choose one. The driver then invokes the proper function to carry out the action chosen by the menu item. It seems logical to handle the menu choices using a switch statement. Switch Statement in …

Menu Driven Program in C Read More »

Simple Interest Program in C

Simple Interest (S.I.) is a way for figuring out how much interest will accrue on a specific principle sum of money at a certain rate of interest. SImple Interest Formula Simple interest is calculated using the following formula: simple interest = (P * T * R) / 100. where P stands for principle, T for …

Simple Interest Program in C Read More »

C Program For Perfect Number

A positive integer that is a perfect number and equals the sum of its appropriate divisors. The sum of the lowest perfect number, 6, is made up of the digits 1, 2, and 3. Why for loop is used in perfect number program in c? In the C programming language, the for loop is used …

C Program For Perfect Number Read More »

C Program for Fibonacci Series

In this program to find fibonacci series, you will learn how to display the fibonacci sequence of the first n integers entered by the user. You must be familiar with the following c programming concepts to understand this example For Loop Statement in C In C, the for loop is used to iterate over statements …

C Program for Fibonacci Series Read More »

Linear Search Program in C

Linear search program in c using array. In this program, we can execute a linear search algorithm in c using an array for beginners. Linear Search Definition in C The simplest way of searching a data set is a linear search. Each piece of data is reviewed one by one, beginning at the beginning of …

Linear Search Program in C Read More »

C Programming Examples and Solutions

Basic c programming examples and solutions for beginners.  C programming examples and solutions. C is an extremely capable general-purpose programming language. It can be used to create software such as operating systems, databases, and compilers. For beginners, C programming is an excellent language to learn.The C programming language is an imperative programming language that was …

C Programming Examples and Solutions Read More »

C Program to Print Ascii Value

C Program to print ascii value of all characters to print the ASCII value of characters or letters in a c programming language.  ASCII Code Definition The American Standard Code For Information Interchange (ASCII) is a standard data-transmission code used by smaller and less powerful computers to convey both textual data (letters, numbers, and punctuation …

C Program to Print Ascii Value Read More »

Pascal Triangle Program in C

Pascal triangle program in c. Floyd’s triangle is a natural-numbers triangular array used in computer science education. Robert Floyd was the inspiration for the name.  For Loop in C A for loop is a repetition control structure that allows us to create a loop that runs a set number of times. The loop allows us …

Pascal Triangle Program in C Read More »

Pyramid Pattern Program in C

Pyramid pattern program in c for beginners in programming language to understand the basic concepts of programming and looping like for loop and while loop. While Loop in C In C programming, a while loop runs a target statement repeatedly as long as a condition is true. A while loop is a control flow statement …

Pyramid Pattern Program in C Read More »

Newton Raphson Method Program in C

Newton raphson method program in c. In the c programming language, this program implements the Newton Raphson method for finding the real root of a nonlinear equation. The Newton–Raphson technique, named after Isaac Newton and Joseph Raphson, is a root-finding procedure in numerical analysis that gives successively improved approximations to the roots of a real-valued …

Newton Raphson Method Program in C Read More »

Absolute Value Function in C

The abs () function returns the absolute value of the given integers and is defined in the stdlib. h header file. So, in order to return the absolute value of a given number, the C program must include the stdlib.h header file. Only positive numbers are returned by the abs() function. Function in C The abs …

Absolute Value Function in C Read More »

Sequential Search in C

The technique of identifying a certain value position in a list of values is known as searching. It determines whether or not a search key exists in the data. It’s the mathematical technique of locating a certain object inside a set of items. It can be performed on both internal and external data structures. Searching …

Sequential Search in C Read More »

fclose() Function in C

The fopen function opens a file and returns a pointer to structure FILE, a predefined structure in the “stdio.h” header file. If the file is successfully opened, it returns a reference to the file; if the file cannot be opened, it returns NULL. The fgetc method returns a character from the file, whereas the fclose …

fclose() Function in C Read More »

C Program to Print a String

The printf function returns the value of the argument it was supplied. Then, if it’s saved in a character array, we’ll see how to print it. The characters in the element will be printed in the output. Char in C Program to Print a String To store characters and letters, C employs the char type. …

C Program to Print a String Read More »

Itoa Function in C

In C, the itoa () function is used to convert an int data type to a string data type. The itoa() function converts a character string from an integer n. Acronym. Definition. ITOA (Integer to ASCII) is a program that converts integers to ASCII characters (American Standard Code for Information Interchange; computer programming) The string …

Itoa Function in C Read More »

Strcpy Program in C

Using this program we can copy the value of the variable in the c program which is stored in the variable. strcpy() is a C/C++ standard library function for copying one string to another. It can be found in the string.h header file in C and the cstring header file in C++. Strcpy Function in …

Strcpy Program in C Read More »

Descending Order Program in C

Descending order program in c condition for beginners to sort the program in descending order which means the bigger values are the first values in the output Descending Order in C and How it Works Descending order is a numerical arrangement in which the largest number is placed first, followed by the smallest. It refers …

Descending Order Program in C Read More »

Ascending Order Program in C

This program will sort the array elements in the ascending order in output. Putting numbers in ascending order means starting with the smallest and working your way up to the highest Sorting in C Program Sorting is the process of putting items in ascending (or descending) order. When people realised how important it was to …

Ascending Order Program in C Read More »

Radix Sort Program in C

Radix sort program in c for beginners. This program will help you to run the execute the program using radix. This is one of the complex sorting programs when compared to other sorting programs, it’s not based on the size of the program. Radix Sort in C Radix sort is an integer sorting technique that …

Radix Sort Program in C Read More »

Sum of n Natural Numbers in C

A recursive function is a function that calls itself. Recursion is the name for this strategy. Recursion is a problem-solving technique in which the outcome is determined by the solutions to smaller instances of the same problem. Recursion is supported by most computer programming languages by allowing a function to call itself from within its …

Sum of n Natural Numbers in C Read More »

Address of Variable in C

A pointer is a variable whose value is the address of another variable, or the memory location’s direct address. Before using a pointer to store any variable address, just like any other variable or constant, you must declare it. Pointer in C In C, a pointer is a variable that stores the address of another …

Address of Variable in C Read More »

String Compare in C

A pointer is a variable whose value is the address of another variable, the memory location’s direct address. The act of comparing two or more items by deciding the appropriate, comparable characteristics of each item is referred to as comparison. Pointer in C Program A pointer is a variable whose value is the address of …

String Compare in C Read More »

Passing Array to Function in C

In c, passing an int pointer to a function. A function is a set of statements that work together to complete a mission. A pointer is a variable whose value is the address of another variable that is the memory location’s direct address. Pointer in C Program In C, a pointer is a variable that …

Passing Array to Function in C Read More »

LCM of Two Numbers in C

It is the basic program mathematical programming for new beginners to understand the c program. LCM is an abbreviation for Least Common Multiple. A multiple is the result of multiplying a number by a whole number (greater than 0). A factor is a number that when multiplied by a whole number yields that number.  Uses of LCM …

LCM of Two Numbers in C Read More »

C Program For Multiplication Table

This program will print the multiplication table in c language. Arithmetic Operator is a mathematical operator that is used to perform operations such as addition, subtraction, multiplication, division, modulus, and so on. For Loop in C A for loop is a type of repetition control structure that allows us to create a loop that will …

C Program For Multiplication Table Read More »

Palindrome Number Program in C

This program will the result which is the element is palindrome or not in c. This program will show you whether palindrome number program in c.  Palindrome Number Definition Character-unit palindromes are the most well-known palindromes in English. Backwards and forwards, the characters are the same.  Redivider, deified, civic, radar, level, rotor, kayak, reviver, racecar, …

Palindrome Number Program in C Read More »

Reverse the Number in C

This program is to reverse the number and print in the output screen in c programming. To print the number in reverse the number in c language. While Loop Definition in C A pre-tested loop is also known as a while loop. A while loop, in general, allows a section of code to be performed …

Reverse the Number in C Read More »

Sum of n Numbers in C

Basic c program to execute the  sum of n numbers in c. This program will print the sum of numbers in c programs. To add a number which is entered by the users if you enter the number 3 it will print the number 6. For Loop in C Program A for loop is a …

Sum of n Numbers in C Read More »

Odd or Even Program in C

The software takes an integer and determines if it is odd or even. Here’s the source code for a c program that determines whether a number is odd or even. Odd or Even Number in C To check an integer, the user must first enter it into the variable value. Divide the variable value by 2 …

Odd or Even Program in C Read More »

C Program For Sum of Digits

The user is requested to enter two integers in this example. The sum of these two integers is then computed and shown on the screen. You should be familiar with the following c programming subjects, such as basic c programs, in order to comprehend this example. Addition Operator in C In this application, Printf() displays the …

C Program For Sum of Digits Read More »

Print Hello World in C

In this print hello world in c post you will learn how to print “Hello World” on the screen using c language with example. stdio.h Header File in C The stdio.h file includes functions to take input and display output, such as scanf() and printf(). The application will not compile if you use the printf() …

Print Hello World in C Read More »

C Program to Calculate Sine Value

The ratio of the length of the side of the triangle opposite the angle to the length of the triangle’s hypotenuse is the sine of one of the angles of a right triangle, frequently abbreviated “sin.”  Sin Function in C Sine and cosine are trigonometric functions of an angle in mathematics. In the context of a …

C Program to Calculate Sine Value Read More »

Delay Function in C

In C, use the delay function to print the element after it has been delayed by a user-defined value. The delay function is used to stop a program from running for a specific amount of time. The number of milliseconds is represented by the integer int. You must include the “dos. h” header file, which is …

Delay Function in C Read More »

Merge Sort Algorithm in C

By merging the elements in c, his merge sort program sorts the elements. Values will be initialized in the program after the completion of the value, which is how the merge sort works. This is how merge sort works in its most basic form. Definition of While Loop A while loop in C programming executes …

Merge Sort Algorithm in C Read More »

Adam Number in C

In this program we can check the number is adam number in c program for beginners. Adam Number Definition When an Adam number is reversed, the square of the number and the square of the reversed number should be integers that are opposite each other. While Loop Definition The while statement allows you to loop …

Adam Number in C Read More »

Quick Sort Program in C

In this quick sort program in c for beginners in data structure concept in c. Definition of Quick Sort in C A sorting algorithm that divides a list into two pieces progressively, moving lower items to one side and higher things to the other. It starts by picking one item from the entire list to …

Quick Sort Program in C Read More »

Binary Search Program in C

Binary search program in c to execute the binary search algorithm in c for beginners to understand the searching algorithm using while loop. Binary Search Definition in C In a sorted list, binary search is a quick way to find a specific item. It operates by halving the portion of the list that can hold …

Binary Search Program in C Read More »