convert 12345 to 54321 withoutusing strig

Answer Posted / satrughna sethi

#include<stdio.h>
#include<conio.h>
void main()
{
int i,j;
printf("enter a number");
scanf("%d",&i);
for(int n=1;n<=5;n++)
{
j=i%10;
i=i/10;
printf("%d",j);
}
getch();
}

Is This Answer Correct ?    5 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Hai,I have done with my bachelor of commerce and planing to ms,please suggest me how to convince vo for shifting from commerce to computers. Visa on 8 DEC 2014  Npu university

1605


Here is a good puzzle: how do you write a program which produces its own source code as output?

602


Why malloc is faster than calloc?

594


 write a program that will open the file, count the number of occurences of each word in the the complete works of shakespeare.  You will then tabulate this information in another file.

1732


What are high level languages like C and FORTRAN also known as?

691






What is #line in c?

565


Disadvantages of C language.

664


What is extern storage class in c?

519


write a c program to calculate sum of digits till it reduces to a single digit using recursion

2727


What are the types of macro formats?

613


Explain the concept and use of type void.

633


Is printf a keyword?

763


Create a registration form application by taking the details like username, address, phone number, email with password and confirm password (should be same as password).Ensure that the password is of 8 characters with only numbers and alphabets. Take such details for 3 users and display the details. While taking input password must appear as “****”.

2653


Is it better to bitshift a value than to multiply by 2?

664


The number of bytes of storage occupied by short, int and long are a) 2, 2 and 4 b) 2, 4 and 4 c) 4, 4 and 4 d) none

768