simple c program for 12345 convert 54321 with out using string
Answer Posted / vignesh1988i
hi good morning folks... happy sunday.......
#include<stdio.h>
#include<conio.h>
void main()
{
int n,m;
printf("enter the number :");
scanf("%d",&n);
for(int i=1;n>0;i++)
{
m=n%10;
n=n/10;
printf("\n %d",m);
}
getch();
}
thank u
| Is This Answer Correct ? | 31 Yes | 11 No |
Post New Answer View All Answers
Where is volatile variable stored?
Tell me what is the purpose of 'register' keyword in c language?
What is operator precedence?
What is typedef example?
When I set a float variable to, say, 3.1, why is printf printing it as 3.0999999?
What are multidimensional arrays?
What is structure padding and packing in c?
What is the difference between c and python?
What are terms in math?
the maximum length of a character constant can be a) 1 character b) 8 characters c) 256 chaacters d) 125 characters
Tell us bitwise shift operators?
Explain what is a stream?
How can I delete a file?
Sir,please help me out with the code of this question. Write an interactive C program that will encode or decode multiple lines of text. Store the encoded text within a data file, so that it can be retrieved and decoded at any time. The program should include the following features: (a) Enter text from the keyboard, encode the text and store the encoded text in a data file. (b) Retrieve the encoded text and display it in its encoded form. (c) Retrieve the encoded text, decode it and then display the decoded text. (d) End the computation. Test the program using several lines of text of your choice.
What is the use of the function in c?