simple c program for 12345 convert 54321 with out using string
Answer Posted / sreenivas
#include<stdio.h>
main()
{
long n=12345,r=0;
while(n)
{
r=r*10+n%10;
n=n/10;
}
printf("%ld",r);
}
| Is This Answer Correct ? | 13 Yes | 2 No |
Post New Answer View All Answers
Explain what does the function toupper() do?
What are the advantages of using Unions?
What is realloc in c?
What is advantage of pointer in c?
Create a structure to specify data on students as given below: Roll number, Name, Department, Course, and Year of joining. Assume that there are not more than 450 students in the collage. (a) Write a function to print the names of all students who joined in the last 3 years. (b) Write a function to print the data of a student whose roll numbers are divisible by 4.
What is c variable?
How can type-insensitive macros be created?
What is FIFO?
In a byte, what is the maximum decimal number that you can accommodate?
List some of the static data structures in C?
What is the use of getchar functions?
How will you declare an array of three function pointers where each function receives two ints and returns a float?
Why flag is used in c?
4-Take two sets of 5 numbers from user in two arrays. Sort array 1 in ascending and array 2 in descending order. Perform sorting by passing array to a function mySort(array, sortingOrder). Then multiply both the arrays returned from function, using metric multiplication technique in main. Print result in metric format.
Can you explain what keyboard debouncing is, and where and why we us it? please give some examples