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

What is static and volatile in c?

1219


What is variables in c?

1050


Explain bitwise shift operators?

1241


In C, What is the #line used for?

2197


What is the purpose of ftell?

1074


Explain how do you use a pointer to a function?

1103


What is structure pointer in c?

1046


What is a list in c?

1027


Do you know the use of 'auto' keyword?

1188


What are global variables and explain how do you declare them?

1096


the maximum length of a character constant can be a) 1 character b) 8 characters c) 256 chaacters d) 125 characters

2295


What is the difference between ā€˜g’ and ā€œgā€ in C?

3994


I have written a pro*C program to fetch data from the cursor. where in i have used the concept of BULK FETCH.... each FETCH statement is taking lots of time to fetch specified number of rows at...

10196


Do pointers store the address of value or the actual value of a variable?

1077


while initialization of array why we use a[][2] why not a[2][]...?

2354