Home
Mega Menu
FYBCS
_C
_HTML & CSS
SYBCS
_DS
_SCILAB
TYBCS
_JAVA
_PHP
Download Apk
Home
c
C Program - Write a program to accept an integer and reverse the number
C Program - Write a program to accept an integer and reverse the number
prozone
June 07, 2018
Program
#include<stdio.h>
int main()
{
int a,j=0,p;
printf("enter the no : ");
scanf("%d",&a);
printf("reverse= ");
while(a!=0)
{
p=a%10;
a=a/10;
j++;
printf("%d",p);
}
}
Output:
enter the no : 568
reverse= 865
Post a Comment
0 Comments
Popular Posts
C Program - Write a program to accept a matrix A of size mXn and store its transpose in matrix B. Display matrix B. Write separate functions
June 15, 2018
C Program - Accept x and y coordinates of two points and write a menu driven program to perform the following operations till the user selects Exit
June 14, 2018
C Program - Write a function that accepts a character as parameter and returns 1 if it is an alphabet, 2 if it is a digit and 3 if it is a special symbol. In main, accept characters till the user enters EOF and use the function to count the total number of alphabets, digits and special symbols entered
June 14, 2018
Follow Us
Tags
Powered by Blogger
0 Comments