If 4 digits number is input through the keyboard, Write a
program to calculate sum of its 1st & 4th digit.
Answer Posted / amrit bhujel
#include<stdio.h>
int main(void)
{
int num,a,b;
printf("enter 4 digit number");
scanf("%d",&num);
a=num/1000;
b=num%10;
printf("the num is %d %d",a,b);
return 0;
}
| Is This Answer Correct ? | 3 Yes | 3 No |
Post New Answer View All Answers
explain what is fifo?
in linking some of os executables are linking name some of them
What is methods in c?
What is modeling?
Explain output of printf("Hello World"-'A'+'B'); ?
how to execute a program using if else condition and the output should enter number and the number is odd only...
Explain a file operation in C with an example.
What is the purpose of main() function?
What is a const pointer?
Is calloc better than malloc?
What is the total generic pointer type?
When do we get logical errors?
Explain what is the difference between the expression '++a' and 'a++'?
What does volatile do?
exit () is used to a) exit () terminates the execution of the program itself b) exit () terminates the execution of the loop c) exit () terminates the execution of the block d) none of the above