palindrome for strings and numbers----Can anybody do the
prog?
Answer Posted / subbu
/*some corrections to above solution*/
#include<stdio.h>
#include<conio.h>
void main()
{
int n,r,temp;
int s=0;
printf("enter the number");
scanf("%d",&n);
temp=n;
while(temp>0)
{
r=temp%10;
s=s*10+r;
temp=temp/10;
}
if(n==s)
printf("number is pallindrome");
else
printf("not pallindrome");
getch();
}
| Is This Answer Correct ? | 10 Yes | 5 No |
Post New Answer View All Answers
what is the function of pragma directive in c?
What is a static variable in c?
Write a C program linear.c that creates a sequence of
processes with a given length. By
sequence it is meant that each created process has exactly
one child.
Let's look at some example outputs for the program.
Here the entire process sequence consists of process 18181:
Sara@dell:~/OSSS$ ./linear 1
Creating process sequence of length 1.
18181 begins the sequence.
An example for a sequence of length three:
Sara@dell:~/OSSS$ ./linear 3
Creating process sequence of length 3.
18233 begins the sequence.
18234 is child of 18233
18235 is child of 18234
........ this is coad .... BUt i could not compleate it .....:(
#include
Explain about C function prototype?
a value that does not change during program execution a) variabe b) argument c) parameter d) none
Differentiate between a for loop and a while loop? What are it uses?
differentiate built-in functions and user – defined functions.
Where are some collections of useful code fragments and examples?
Why #include is used in c language?
How is a null pointer different from a dangling pointer?
Which of the following operators is incorrect and why? ( >=, <=, <>, ==)
How can I run c program?
Why c is called procedure oriented language?
What is main function in c?
Do you have any idea how to compare array with pointer in c?