Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

explain what is fifo?

1132


in linking some of os executables are linking name some of them

2200


What is methods in c?

1142


What is modeling?

1097


Explain output of printf("Hello World"-'A'+'B'); ?

1559


how to execute a program using if else condition and the output should enter number and the number is odd only...

2370


Explain a file operation in C with an example.

1173


What is the purpose of main() function?

1303


What is a const pointer?

1196


Is calloc better than malloc?

1075


What is the total generic pointer type?

1211


When do we get logical errors?

1173


Explain what is the difference between the expression '++a' and 'a++'?

1263


What does volatile do?

1037


exit () is used to a) exit () terminates the execution of the program itself b) exit () terminates the execution of the loop c) exit () terminates the execution of the block d) none of the above

1178