answersLogoWhite

0

#include <stdio.h>

#include <conio.h>

void main()

{

int num,rev=0,m,r;

clrscr();

printf("enter any number");

scanf("%d",&num);

m=num;

while(num>0)

{

r=num%10;

rev=rev*10+r;

num=num/10;

}

if(rev==m)

printf("given number is palindrome");

else

printf("given number is not palindrome");

getch();

}

this is the answer.

User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions

What is the C program for heap sort using recursion?

123


Write a program using recursion which should take two values and display 1st value raised to the power of second value?

Write a program using recursion which should take two values and display 1st value raised to the power of second value.


Write c program to print palindrome using string without using strrev strlen strcam?

sdfdg


Can you implement merge sort without using recursion?

Sure, recursion can always be substituted with using a stack.


Write a program using method plainto check whether a string is a palindrome or not A palindrome is a string that reads the same from left to right and vice-versa?

Palindrome number is a number like 121 which remains the same when its digits are reversed. To find this number in a simple java program, just follow the below way. sum = 0; while(n&gt;0) { r=n % 10; sum=concat(r); n=n / 10; } print r;


Advantages and disadvantages of using recursion?

pata nhe


What are the merits and demerits of recursion?

Ans: Merits of recursion are: Mathematical functions, such as Fibonacci series generation can be easily implemented using recursion as compared to iteration technique. Demerits of recursion are: Many programming languages do not support recursion; hence, recursive mathematical function is implemented using iterative methods. Even though mathematical functions can be easily implemented using recursion, it is always at the cost of execution time and memory space. The recursive programs take considerably more storage and take more time during processing.


C program for summation of n nos using recursion?

int sum (int n) { if (n&lt;=1) return n; else return n + sum (n-1); }


Program to find sum of n numbers using recursion function?

int sum(n) { if (n==0) return 0; else return n+sum(n-1); }


How do you write print 1 to 100 using recursion only?

recu


Can you provide a solution to the diamond-square algorithm using Java and recursion?

Yes. It is possible to provide a solution to the diamond-square algorithm using Java and recursion.


How many types of recursion are there in c language?

Recursion in c language is a method where the function calls itself, within or outside the scope. Using Recursion, complicated problems can be divided into smaller parts so that solving them becomes more manageable. The recursion technique is available in Java, JavaScript, and C++.serves the same purpose. The type of Recursion in C • Direct Recursion • Indirect Recursion. Direct Recursion Recursion can call the function n-number of times. In the case of direct Recursion, the function calls itself inside the same position or in the local scope Direct Recursion problems are the Fibonacci series, a program to print 50 natural numbers. Indirect Recursion In the case of Indirect Recursion, a function X calls function Y, and function Y calls any function Z. Under certain conditions, function Z calls function A. In this case, function A is indirectly related to function Z. Indirect Recursion is also known as mutual Recursion, as more than one function runs a program. It is a two-step recursive function call process for making a recursive function call. Below mentioned are also type of Recursion: Tail Recursion No Tail/Head Recursion Linear Recursion Tree Recursion Tail Recursion A function is said to be tail recursion if it calls itself and also calls the last or the previous statement executed in the process. Head Recursion A function is said to be Head Recursion if it calls itself and also calls the first or the beginning statement executed in the process. Linear Recursion A function is said to be a linear recursive function if it makes a single call to itself each time the procedure executes itself and grows linearly depending on the size of the problem. Tree Recursion Tree Recursion is different from linear Recursion. Rather than making only one call to itself, that function makes more than one recursive call to the process within the recursive function. Following are the steps to solve the recursive problem in C: Step 1: Create a function and assign the work a part should do. Step 2: Select the subproblem and assume that the function already works on the problem. Step 3: Get the answer to the subproblem and use it to resolve the main issue. Step 4: The 90% of the problem defined is solved.

Trending Questions
Which indicator is used while titrating mohrs salt against potassium dichromate using internal indicator analysis? What is the value of one ampere? What is the function of test pen for electrical wiring installation? Write a C program to evaluate the given polynomial fxa4x4 a3x3 a2x2 a1x a0 for given value of x and the coefficients using Horners method using single dimension arrays to store coefficient? Is rubber recyclable? What is the initial value of a numeric variable? What does an electrical engineer with a masters degree make? If ammeter 1 reads 2.A what will ammeter 2 read? What are some inventions or technologies that have been made through the twenty-first century? Why is the current the same in all locations in series circuit? Important topics in c plus plus? What is the primary purpose of invention techniques? A 6.50 mu F capacitor that is initially uncharged is connected in series with a 4500 Omega resistor and a 500 rm V emf source with negligible internal resistance Just after the circuit is completed? How do you put music on a website without the music file being online? What is wall thickness of ms pipe schedule 40 and schedule 80? What is thereal name shravan baat hamari pakki hai? Why do you think that the toolbox the form and the properties window are crucial to the concept of visual programming? How do you Convert binary number 10000001 to decimal? Can you create a site map using MS Notepad? What are the Advantages and disadvantages of working stress design and ultimate strength design?