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

Tell me when would you use a pointer to a function?

1030


What are the two types of functions in c?

966


What is the use of extern in c?

1066


What do you understand by normalization of pointers?

1017


Why does notstrcat(string, "!");Work?

1100


What are near, far and huge pointers?

1025


Explain the bubble sort algorithm.

1014


printf(), scanf() these are a) library functions b) userdefined functions c) system functions d) they are not functions

1118


How do you define CONSTANT in C?

1222


What is #pragma statements?

1065


What is output redirection?

1180


What are the advantages of using linked list for tree construction?

1042


Write the syntax and purpose of a switch statement in C.

1064


What is the difference between union and structure in c?

1109


In a byte, what is the maximum decimal number that you can accommodate?

1087