Want to become a Vibe Coder? Join Vibe Coding Training here
x
C# Corner
Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Reverse of number Program In C
WhatsApp
Ashish Srivastava
Apr 03
2016
659
0
0
#include<stdio.h>
#include<conio.h>
int
revint(
int
);
void
main()
{
int
n,result;
clrscr();
printf(
"Eneter the no"
);
scanf(
"%d"
,&n);
result=revint(n);
printf(
"The reverse of number %d is %d"
,n,result);
getch();
}
int
revint(
int
p)
{
int
d;
static
int
r=0;
if
(p==0)
{
return
(p);
}
else
{
d=p%10;
r=r*10+d;
revint(p/10);
}
return
(r);
}
Reverse of number
C
Up Next
Reverse of number Program In C