Saturday, February 13, 2010

Basic C/C++ Programs for technical Interviews


Basic C Programs for Technical Interviews
1. Swap two no’s without using third variable.
2. Reverse a given number.
3. Greatest in 3 numbers.
4. Given no is even or odd.
5. Display first 10 natural no & their sum.
6. Factorial of a number.
7. Given no is a prime no or not.
8. Add two number using pointers.
9. Multiplication of two matrices.
10. Reverse a number using pointer.
11. Swap two numbers using functions.
12. Factorial of a number using functions.
13. Call by value.
14. Call by reference.
15. Factorial of a number using recursion.
16. String is palindrome or not.


Basic C++ Programs for Technical Interviews
1. To add two numbers.
2. Swap two no’s without using third variable.
3. To find out the Greater Number.
4. To find out whether a number is Palindrome or not
5. To find out whether number is even or odd
6. To implement friend function.
7. To implement friend classes.