Answer Posted / giri
#include <stdio.h>
#include <conio.h>
void main()
{
int sum=0, num, mul=1;
printf("Enter the number");
scanf("%d", &num);
while(num)
{
sum = sum + ((num%10)*mul);
num = num/10;
mul = mul * 10;
}
printf("Sum is %d", sum);
}
| Is This Answer Correct ? | 6 Yes | 7 No |
Post New Answer View All Answers
What are the characteristics of arrays in c?
Why isnt there a numbered, multi-level break statement to break out
Why is c so important?
What does sizeof int return?
What are the 4 types of unions?
Write the test cases for checking a variable having value in range -10.0 to +10.0?
Write programs for String Reversal & Palindrome check
Explain how can you check to see whether a symbol is defined?
What is the use of getchar() function?
What is the scope of global variable in c?
What are global variables and how do you declare them?
What are the advantages of the functions?
What is the basic structure of c?
Create a structure to specify data on students given below: Roll number, Name, Department, Course, Year of joining Assume that there are not more than 450 students in the college. 1.write a function to print names of all students who joined in a particular year 2.write a function to print the data of a student whose roll number is given
which type of aspect you want from the student.