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
What are identifiers c?
What is #define size in c?
What is difference between static and global variable in c?
Is c procedural or functional?
How do I send escape sequences to control a terminal or other device?
Explain what will the preprocessor do for a program?
What is the difference between union and anonymous union?
Why dont c comments nest?
What is the behavioral difference when include header file in double quotes (“”) and angular braces (<>)?
Why is structure padding done in c?
What's the difference between constant char *p and char * constant p?
A float occupies 4 bytes in memory. How many bits are used to store exponent part? since we can have up to 38 number for exponent so 2 ki power 6 6, 6 bits will be used. If 6 bits are used why do not we have up to 64 numbers in exponent?
What is union and structure?
why return type of main is not necessary in linux
What is a structure and why it is used?