C

An Armstrong number is a number in which the sum of cubes of individual digits is equal to the Given number. Today we are going to learn how to write a C Program to check Armstrong Number. In this program we are using 4 variables n, temp, rem, sum to check an Armstrong Number. n […]

This program takes number of lines as input and displays the following pattern as output 1 0 1 1 0 1 0 1 0 1 1 0 1 0 1 0 1 0 1 0 1 The program uses two for loops. The first for loop is used to determine the line number and the […]

C Program to Find Number of Vowels present in a String

July 24, 2013

In the program, a string or a sentence is given as an input and the number of vowels and consonants in the given statement are displayed as output. The program uses gets() to read the string. The for loop iterates until the value of i equals the length of the string. The length of the […]

Read the full article →

C Program to Implement Priority Scheduling

April 26, 2013

Priority scheduling is similar to Shortest Job First scheduling. Except in priority scheduling we ask the user to give Priorities to every process that enters the queue. Based on the priority given to each process the processes are swapped and the Process which is having the highest priority is executed first. For instance we have […]

Read the full article →

C Program to implement Singly Linked List

April 13, 2013

Linked list is the one of the important concepts of Data Structures. They are stored in non-contiguous memory spaces. They are very powerful and easy to learn. First let us deal with Singly Linked list. You need to be familiar with pointers concept. A Single Linked List will may contain many nodes which comprises two […]

Read the full article →

C / C++ Program to perform Arithmetic Operations

April 11, 2013

This is a simple C and C++ program to perform Arithmetic Operations like Addition, Subtraction, Multiplication, Division and for finding Remainder of two given integers. This program uses a Switch-case to determine which operation to perform. C Program to perform Aruthmetic Operations C++ Program to perform Arithmetic Operations Output:

Read the full article →

C Program to find Smallest Number in an Array

March 29, 2013

This program is used to find the smallest number present in an array. We are defining a function here called smallest. In this function we are declaring a integer variable small and initializing it to the first element of an array (Array count starts at 0). So we are using a for loop here and […]

Read the full article →

C Program to perform Sum of Digits until Single Digit is obtained

February 24, 2013

This Program is used to Find the sum of the digits of a number repeatedly until we get a single digit output. For example if we take a number : 1234, it will be calculated as 1+2+3+4 = 10 then 1+0 = 1. So the final Result will be 1. First we are requesting the […]

Read the full article →

C Program to Convert Binary to Decimal

February 22, 2013

This article provides Source code and explanation for Conversion of given Binary Number to Decimal Number. A Binary Number is a Number which will be in the form of 0’s and 1’s. For example take a Binary digit: 110101. The corresponding Decimal Number can be given by the expression: 1*(2^5) + 1*(2^4) + 0*(2^3) + […]

Read the full article →

C Program to Implement Stack using Linked List

February 13, 2013

In this article we will be discussing on how to implement Stack using Linked List. If you aren’t aware of Stack take a look of the C Program to Implement Stack using Arrays. An excerpt about Stack: Stack is a memory structure in which addition and deletion of elements takes place from only one side. […]

Read the full article →