If 4 digits number is input through the keyboard, Write a
program to calculate sum of its 1st & 4th digit.
Answer Posted / nikita singh
#include<stdio.h>
#include<conio.h>
void main()
{
int num,a,b,sum;
clrscr();
printf("enter a four digit no");
scanf("%d",&num);
a=num%10;
b=num/1000;
sum=a+b;
printf("sum is =%d",sum);
getch();
}
| Is This Answer Correct ? | 24 Yes | 15 No |
Post New Answer View All Answers
Distinguish between actual and formal arguments.
Explain bitwise shift operators?
What is #error and use of it?
How can I recover the file name given an open stream?
What is c language and why we use it?
What is gets() function?
What is a good way to implement complex numbers in c?
WHAT IS THE DEFINATION OF IN TECHNOLOGY AND OFF TECHNOLOGY ?
What is the advantage of a random access file?
What is a memory leak? How to avoid it?
What is ambagious result in C? explain with an example.
What is a structural principle?
write a program to reverse a every alternetive words in a string in a place. EX: Input is "this is the line of text" Output should be "shit is eht line fo text" Please any one tell me code for that.
What is the explanation for prototype function in c?
Differentiate between functions getch() and getche().