Skip to content

Category Archives: C Programs

C program to print 180-degree rotation of inverted half pyramid pattern using two approaches i.e. for loop and while loop. Input: Number = 5 Output:… Read More
A year is a leap year if the following conditions are satisfied:  The year is multiple of 400. The year is multiple of 4 and… Read More
Character extraction can be done by iterating through the string in the form of a character array. It basically means plucking out a certain amount… Read More
Given a character, we need to print its ASCII value in C. Examples: Input: a Output: 97 Input: D Output: 68 C code: We use… Read More
Given a Temperature n in Fahrenheit scale convert it into Celsius scale. Examples: Input: 32 Output: 0 Input: -40 Output: -40 Recommended: Please try your… Read More
LCM (Least Common Multiple) of two numbers is the smallest number which can be divided by both numbers. For example, LCM of 15 and 20… Read More
In Turbo C graphics the graphics.h functions are used to draw different shapes(like a circle, rectangle, etc), and display text(any message) in different formats (different… Read More
The command-line argument (CLA) is the parameter provided in the system upon request. Command-line conflict is an important concept in system C. It is widely… Read More
Prerequisite: Socket Programming in C/C++, fork() System call  Problem Statement: In this article, we are going to write a program that illustrates the Client-Server Model… Read More
Given a number N and an integer K, the task is to set the Kth bit of the number N, i.e., if the Kth bit… Read More
Introduction to Identity Matrix :  The dictionary definition of an Identity Matrix is a square matrix in which all the elements of the principal or… Read More
Given a singly linked list, find middle of the linked list and set middle node of the linked list at beginning of the linked list. Examples:… Read More
Two pointers is really an easy and effective technique which is typically used for searching pairs in a sorted array.Given a sorted array A (sorted… Read More
Efficient approach: If we are allowed to buy and sell only once, then we can use following algorithm. Maximum difference between two elements. Here we… Read More
Given a undirected graph with V vertices and E edges. The task is to perform DFS traversal of the graph. Examples: Input: V = 7,… Read More

Start Your Coding Journey Now!