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
how can i write a program that prints out a box such that whenever i press any key8(coordinate number) on the keyboard, the box moves.
Can you please compare array with pointer?
When should a type cast not be used?
Simplify the program segment if X = B then C ← true else C ← false
WHAT IS THE DEFINATION OF IN TECHNOLOGY AND OFF TECHNOLOGY ?
Explain the use of fflush() function?
What is the use of static variable in c?
main() { struct s1 { char *str; struct s1 *ptr; }; static struct s1 arr[] = { {"Hyderabad",arr+1}, {"Bangalore",arr+2}, {"Delhi",arr} }; struct s1 *p[3]; int i; < BR> for(i=0;i<=2;i++) p[i] = arr[i].ptr; printf("%s ",(*p)->str); printf("%s ",(++*p)->str); printf("%s ",((*p)++)->str); }
How are Structure passing and returning implemented by the complier?
write an algorithm to display a square matrix.
Why is event driven programming or procedural programming, better within specific scenario?
Explain the concept and use of type void.
why we wont use '&' sing in aceesing the string using scanf
Can you please explain the difference between syntax vs logical error?
What are valid operations on pointers?