C Programming – Basic
C Programming - Basic Time limit: 0 Quiz-summary 0 of 10 questions completed Questions: 1 2 3 4 5 6 7 8 9 10 Information Test your basic C programming skill. You have already completed the quiz...
View ArticleGeneral Knowledge – Set 1
General Knowledge - Set 1 Time limit: 0 Quiz-summary 0 of 10 questions completed Questions: 1 2 3 4 5 6 7 8 9 10 Information Test your general knowledge skill set 1 You have already completed the quiz...
View ArticleC Programming – Data Types
C Programming - Data Types Time limit: 0 Quiz-summary 0 of 10 questions completed Questions: 1 2 3 4 5 6 7 8 9 10 Information Test your C Data Type skill. Answers can be viewed after completion of all...
View ArticleC Program to Check Whether a Number is Palindrome
Palindrome is a number or sequence of characters which reads same backward and forward. If we reverse a palindrome number, the reversed and original number will be same. The first C program checks...
View ArticleC Program to Convert Decimal to Binary
Following C programs converts a decimal number to its binary equivalent. Using recursive function#include <stdio.h> void binary(int n) { if(n > 0) { binary(n/2); printf("%d", n%2); } } void...
View ArticleC Program to Get a Digit of Any Position of a Number
This C program finds the digit of specified position of a number. The numbering starts from 0. The least significant digit of a number is 0-th digit. For example 0th digit of 2341238 is 8 and 3-rd...
View ArticleC Program Insert Element in a Singly Linked List
Following C programs show how to insert elements in a singly linked list, at the front, end or a specified location. Insert at the front of the list#include <stdio.h> #include <stdlib.h>...
View ArticleDelete an element from a singly linked list
Here is the C program to delete an element from a singly linked list. #include #include struct node{ int val; struct node *next; }; struct node * find_node(struct node *head, int val) { struct node...
View ArticleC Program to Check Whether a Number is Odd or Even
Check odd or even using modulus operator Even numbers are always divisible by 2. If you do the modulo operation on the given number with 2 and the reminder is 0,then the number is even, otherwise, odd....
View ArticleInsert an Element in a Sorted Singly Linked List
Sorted Linked List is a linked list where the elements are always sorted. Insert operation in a singly is bit tricky. You have to insert an element such a way that the list remains sorted after...
View ArticleC Program to Convert Binary Number to Decimal
Binary number system is 2-based which means at most two symbols, 0 (zero) and 1 (one), can be used to represent a binary number. Example of binary number is 110110011, sometimes binary numbers are...
View ArticleC Program to Sort Linked List without Allocating Extra Memory
We’ll first create a linked list which is not sorted, then we’ll re-arrange the list such that the list becomes sorted. Logic is simple, we’ll iterate the list for all nodes, in every iteration we’ll...
View ArticleLoop in Linked List, C Program to Detect and Remove
What is loop in linked list? Loop in linked list means you can traverse the list endlessly. If you traverse a linked list with loop, you will hit all or some of the nodes again and again. We’ll see how...
View ArticleHow to Implement Periodic Timer in Linux
In this article we’ll see how to implement periodic timer in Linux using C programming language. We’ll first create a timer library that will be used to create one or more timers. Timers can be...
View ArticleHow to Access MySQL Database from C Program?
MySQL is an open sourcce database management system (DBMS). It is very popular among the web developers as it is part of LAMP (Linux, Apache, MySQL, PHP/Perl/Python) stack. Many popular large scale...
View ArticleHow to Implement Singly Linked List in C?
What is singly linked list? In computer science, linked list is a collection of data elements, also called nodes, which are connected or linked by means of pointers or references. Connected or linked...
View ArticleHow to Remove Duplicate Entries from Linked List in C Programming?
Here we’ll see how to write C program to remove duplicate entries from linked list. Duplicate entry means nodes with same value appear multiple times in the list. Linked list in the diagram above...
View ArticleHow to Parse and Print XML File in Tree Form using libxml2 in C Programming?
Here we’ll see how to write C program to print XML file on the screen. XML file is widely used to store and transport data over internet. Parsing and using the data from an XML file is basic...
View ArticleHow to Implement Insertion Sort in C Programming?
Insertion sort is very popular sorting algorithm which is probably taught among first few sorting techniques in programming syllabus. Its popularity is not because of its performance but for its...
View ArticleHow to Implement Bubble Sort in C Program?
Here we’ll see how to implement bubble sort in C programming language. Bubble sort probably is among the first few sorting algorithms that are being taught in programming syllabus. Its popularity is...
View Article