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
Which one to choose from 'initialization lists' or 'assignment', for the use in the constructor?
in linking some of os executables are linking name some of them
count = 0; for (i = 1;i < = 10; i++);count = count + i; Value of count after execution of the above statements will be a) 0 b) 11 c) 55 d) array
How is a null pointer different from a dangling pointer?
What is an auto keyword in c?
Draw a flowchart to produce a printed list of all the students over the age of 20 in a class .The input records contains the name and age of students. Assume a sentinel value of 99 for the age field of the trailer record
Explain what is a const pointer?
Explain what is the stack?
hi folks i m approching for h1 b interview on monday 8th of august at montreal and i m having little problem in my approval notice abt my bithdate my employer has made a mistake while applying it is 12th january and istead of that he had done 18 the of january do any body have any solution for that if yes how can i prove my visa officer abt my real birthdate it urgent please let me know guys thaks dipesh patel
What is pointer & why it is used?
Explain how do you view the path?
How many identifiers are there in c?
What is bss in c?
What is a c token and types of c tokens?
What is an endless loop?