Skip to content

Category Archives: C Programs

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
An array contains both positive and negative numbers in random order. Rearrange the array elements so that positive and negative numbers are placed alternatively. Number… Read More
Rearrange a linked list in such a way that all odd position nodes are together and all even positions node are together, Examples:  Input: 1->2->3->4 Output:… Read More
Given a linked list, the task is to make a function which checks whether the length of the linked list is even or odd.  Examples:… Read More
Pre-requisite: Format specifiers in C The format specifier is used during input and output. It is a way to tell the compiler what type of… Read More
Given a matrix A and a matrix B, their Kronecker product C = A tensor B, also called their matrix direct product, is an matrix.  A tensor B… Read More
Given an array that is sorted and then rotated around an unknown point. Find if the array has a pair with a given sum ‘x’.… Read More

Start Your Coding Journey Now!