Saturday, 14 July 2012

How to Reverse a given number using C program

#include<stdio.h> int main() {     int num,r,reverse=0;     printf("Enter Any numb: ");     scanf("%d",&num);     while(num) {          r=num%10;          reverse=reverse*10+r;          num=num/10;    ...

Saturday, 14 July 2012 by Unknown · 0

How to find power of a given number in C program

Find out power of a given number using C program. The full source code of this program is  below: #include<stdio.h> int main() {   int pow,num,i=1;   long int sum=1;   printf("\nEnter a number: ");   scanf("%d",&num);   printf("\nEnter power: ");   scanf("%d",&pow);   while(i<=pow) {            ...

by Unknown · 0

Aptitude Questions and Answers for Interviews

1. I come once in a day, twice in a hour thrice in a minute. Who am I? Answer: Vowel Letters 2. If a monkey climbes 3 meters in 1 hour and slips back 2 meters. What the time taken to climb 20 meters? Answer: 18 Minutes 3. Given that the cost price of 10 oranges is equal to the cost price of 1 kg of apples and the cost price of 12 apples is equal to the cost price of 1 kg of oranges. If the selling price of 15 oranges is equal...

by Unknown · 0