If 4 digits number is input through the keyboard, Write a
program to calculate sum of its 1st & 4th digit.
Answer Posted / vinay
#include<stdio.h>
main()
{
int n,n1,n4,z;
printf("Enter 4 digit number:");
scanf("%d",&n);
n4=n%10;
n1=n/1000;
z=n1+n4;
printf("Result=%d",z);
system("pause");
}
Is This Answer Correct ? | 11 Yes | 6 No |
Post New Answer View All Answers
When I tried to go into a security sites I am denied access and a message appeared saying 'applet not initialize'. How can I rectify this problem.
in multiple branching construct "default" case is a) optional b) compulsarily c) it is not include in this construct d) none of the above
Can you subtract pointers from each other? Why would you?
Can you tell me how to check whether a linked list is circular?
What standard functions are available to manipulate strings?
What is the use of bit field?
What is function definition in c?
Can a pointer point to null?
please give me some tips for the placement in the TCS.
How do I get an accurate error status return from system on ms-dos?
What is main function in c?
A collection of data with a given structure for excepting storing and providing on demand data for multiple users a) linked list b) datastructer c) database d) preprocessor
What is file in c language?
What does a pointer variable always consist of?
What is #error and use of it?