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 the difference between call by value and call by reference in c language?

1050


Explain what does a function declared as pascal do differently?

1205


What does typedef struct mean?

1038


List some applications of c programming language?

899


What is bss in c?

1044


What is the sizeof () operator?

1010


How can I write a function analogous to scanf?

1094


Can you explain what keyboard debouncing is, and where and why we us it? please give some examples

2142


Explain what is the difference between far and near ?

1046


What are the advantages of the functions?

1094


A c program to display count values from 0 to 100 and flash each digit for a secong.reset the counter after it reaches 100.use for loop,. pls guys hepl me.. :(

2199


Explain how can I write functions that take a variable number of arguments?

1027


What could possibly be the problem if a valid function name such as tolower() is being reported by the C compiler as undefined?

1225


write a c program for swapping two strings using pointer

2565


What is sorting in c plus plus?

921