Saturday, November 22, 2014

Special Rectangles

There are only 3 rectangles in Mathematics whose perimeters are same as their areas and there are only 2 integers which represent these areas. What are those numbers?

Post your answers in the comment or email to me.

- A very ancient Egyptian cult

Tuesday, March 30, 2010

Problems on String Manipulation

Objective:- Print alternate characters of a string.

Process:-

void DisplayAlternateCharacters(char strSource[])
{
//Loop counter
int iLoopCounter = 1;

//***************************************************************************************
//We will hop the counter 2 steps at a time. The termination condition will check against
//the characters pointed to by both the current counter and the its preceeding counter.
//***************************************************************************************

for (; (strSource[iLoopCounter] != '\0') && (strSource[iLoopCounter - 1] != '\0');
iLoopCounter += 2)
printf("%c\n", strSource[iLoopCounter]);
}