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
What is static and volatile in c?
What is variables in c?
Explain bitwise shift operators?
In C, What is the #line used for?
What is the purpose of ftell?
Explain how do you use a pointer to a function?
What is structure pointer in c?
What is a list in c?
Do you know the use of 'auto' keyword?
What are global variables and explain how do you declare them?
the maximum length of a character constant can be a) 1 character b) 8 characters c) 256 chaacters d) 125 characters
What is the difference between āgā and āgā in C?
I have written a pro*C program to fetch data from the cursor. where in i have used the concept of BULK FETCH.... each FETCH statement is taking lots of time to fetch specified number of rows at...
Do pointers store the address of value or the actual value of a variable?
while initialization of array why we use a[][2] why not a[2][]...?