Answer Posted / sarthak patwal
#include <stdio.h>
#include <conio.h>
void main()
{
clrscr();
int a,b,c,d;
printf ("Enter the number");
scanf ("%d",a);
b=a%10;
c=a/10;
d=b+c;
printf ("The sum of digits is %d",d);
getch();
}
Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
Why pointers are used?
What is the role of && operator in a program code?
Why does not c have an exponentiation operator?
What is file in c preprocessor?
Can a void pointer point to a function?
How can you increase the size of a statically allocated array?
What is the best style for code layout in c?
What does 3 mean in texting?
Write a C/C++ program to add a user to MySQL. The user should be permitted to only "INSERT" into the given database.
write a c program thal will find all sequences of length N that produce the sum is Zero, print all possible solutions?
How can I recover the file name given an open stream?
What are static variables in c?
What is pointer to pointer in c?
code for find determinent of amatrix
What do header files do?