If 4 digits number is input through the keyboard, Write a
program to calculate sum of its 1st & 4th digit.
Answer Posted / anil
#include<stdio.h>
#include<conio.h>
void main()
{
int num,first,last,total;
printf("enter the 4 digit number");
scanf("%d",&num);
first=num/1000;
last=num%10;
total=first+last;
printf("the total of first and last digit is %d",total);
getch();
}
| Is This Answer Correct ? | 7 Yes | 4 No |
Post New Answer View All Answers
Is there any algorithm to search a string in link list in the minimum time?(please do not suggest the usual method of traversing the link list)
How can I write functions that take a variable number of arguments?
How to establish connection with oracle database software from c language?
What is main () in c?
How can you be sure that a program follows the ANSI C standard?
What are the application of c?
What is #pragma statements?
How arrays can be passed to a user defined function
What is void c?
What is New modifiers?
Explain indirection?
1) There is a singing competition for children going to be conducted at a local club. Parents have been asked to arrive at least an hour before and register their children’s names with the Program Manager. Whenever a participant registers, the Program Manager has to position the name of the person in a list in alphabet order. Write a program to help the Program Manager do this by placing the name in the right place each time the Program Manger enters a name. 2) the Event Manager has to send participants to the stage to perform in the order in which they registered. Write a program that will help the Event Manager know who to call to the stage to perform. The Logic should be in Data Structures
Define VARIABLE?
What are nested functions in c?
write a c program to find the sum of five entered numbers using an array named number