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 how many levels deep can include files be nested?
Explain what will be the outcome of the following conditional statement if the value of variable s is 10?
What is the purpose of void pointer?
Is main is a keyword in c?
#define PRINT(int) printf("int = %d ",int) main() {< BR> intx,y,z; x=03;y=02;z=01; PRINT(x^x); z<<=3;PRINT(x); y>>=3;PRINT(y); }
What is #include stdio h?
Is boolean a datatype in c?
diff between exptected result and requirement?
What are compound statements?
What is a good way to implement complex numbers in c?
What is the use of sizeof?
Explain what is the advantage of a random access file?
What is the difference between āgā and āgā in C?
I need a sort of an approximate strcmp routine?
what is a NULL Pointer? Whether it is same as an uninitialized pointer?