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 the difference between call by value and call by reference in c language?
Explain what does a function declared as pascal do differently?
What does typedef struct mean?
List some applications of c programming language?
What is bss in c?
What is the sizeof () operator?
How can I write a function analogous to scanf?
Can you explain what keyboard debouncing is, and where and why we us it? please give some examples
Explain what is the difference between far and near ?
What are the advantages of the functions?
A c program to display count values from 0 to 100 and flash each digit for a secong.reset the counter after it reaches 100.use for loop,. pls guys hepl me.. :(
Explain how can I write functions that take a variable number of arguments?
What could possibly be the problem if a valid function name such as tolower() is being reported by the C compiler as undefined?
write a c program for swapping two strings using pointer
What is sorting in c plus plus?