From the category archives:

C

C Programming Language Cheat Sheet

October 4, 2009

C Language Cheat Sheet for learning shortcuts to common problems, list of useful syntax and other information to make coding easier

0 comments
C Programming

Use of Switch to Calculate Area

September 30, 2009

Using Switch statement to create a Menu Driven program to calculate Area of different shapes.

0 comments
C Programming

Count number of Words in a String

September 30, 2009

Program to count number of words in a Line in C Source Code.

2 comments
C Programming

Count number of Vowels and Consonants in a String

September 30, 2009

Program to count number of Vowels (a,e,i,o,u) and consonants in a String in C

C Programming

Finding String Length in C

September 30, 2009

Program to count the number of characters in a given string using while loop. Useful for calculating the length of a given string as C doesn’t have an inbuilt function for the same.

0 comments
C Programming

Sorting a String

September 30, 2009

Program to Sort a given String in C.

0 comments
C Programming

Splitting an Array

September 30, 2009

The following program splits an array into two different arrays of equal length.

0 comments
C Programming

Recursion using Fibonacci Series

September 30, 2009

This program demonstrates recursion using Fibonnacci Series program.

0 comments
C Programming

How to find prime numbers in a given range

September 27, 2009

Logic behind the program is to check till half of the number (n/2) because it has been observed that the remainders get repeated after half of the number. Therefore, checking for remainders till n/2 is sufficient enough. The use of modulus operator(%) is important in this regard.

0 comments
C Programming

How to check if a string is a Palindrome

September 27, 2009

A String can be checked for palindrome using two while loops. One for counting the string length and second for checking the [i]th element of the substring with the original string to be compared with.

0 comments
C Programming

Sum of Digits of a Number

September 27, 2009

Sum of Digits of a number is taken out in two steps. One, using the modulus operator (%) and taking remainder by dividing by 10 to get individual digits and then diving the number itself by 10 to reduce the least significant. It is similar to reversing digits of the number.

0 comments
C Programming

Reverse digits of a number

September 27, 2009

Reverse of Digits of a number is taken out in two steps. One, using the modulus operator (%) and taking remainder by dividing by 10 to get individual digits and then diving the number itself by 10 to reduce the least significant. It is similar to taking sum of digits.

0 comments
Page 1 of 41234