Monday, January 30, 2012

Volume of a Cube, Cuboid & Cylinder using Function Overloading

Write a Program to find Volume of a Cube, Cuboid & Cylinder using Function Overloading.

Swap using Call by Address.

Write a Program to enter two no.s and swap their values using Call by Address.

Swap using Call by Value

Write a Program to enter two no.s and swap their values using Call by Value.

Swap using Call by Reference

Write a Program to enter two no.s and swap their values using Call by Reference

Sum of Digits

Write a Program to enter a no. & find the sum of its digits.

Inline Function

Write a Program to calculate Simple Interest & show the use of Inline function.

Default Argument

Write a Program to enter two no.s, m & n and find m^n using default arguments such that the output is square of m. Do not use Library functions.

Pattern -3

Write a Program to enter the no. of rows & print the following Pattern:
*
*  *
*  *  *
*  *  *  *
*  *  *  *  *

Pattern - 2

Write a Program to enter the no. of rows & print the following Pattern:
         +
      + + +
   + + + + +
+ + + + + + +

Wednesday, January 25, 2012

Pattern -1

Write a Program to enter a starting number(x) and print the number the following Pattern :
for x=5
5
54
543
5432
54321

Palindrome String

Write a Program to input a String and check whether it is a Palindrome or not.

Palindrome Number

Write a Program to input a number and check whether it is a Palindrome or not.

Matrix Multiplication

Write a Program to enter two matrices and print their Product.

Matrix Addition

Write a program to enter two matrices and print their sum.