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

Write the program that calculates and prints the average of several integers. Assume that the last value read is sentinel 9999.

3240


What is an arrays?

741


Where is volatile variable stored?

751


What are the advantages of c language?

763


What is preprocessor with example?

677






Write a factorial program using C.

731


Why c is a procedural language?

696


any restrictions have on the number of 'return' statements that may be present in a function. a) no restriction b) only 2 return statements c) only 1 return statements d) none of the above

764


Why is %d used in c?

661


Write a c program to build a heap method using Pointer to function and pointer to structure ?

4267


Explain what is the purpose of "extern" keyword in a function declaration?

719


What is the difference between scanf and fscanf?

749


Are there any problems with performing mathematical operations on different variable types?

666


typedef enum { html, java, javascript, perl, cgi } lang;The above statement defines a : a) Union b) User defined type c) Enumerated variable d) none

836


What is a method in c?

712