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...

4) Write a program that takes a 5 digit number and
calculates 2 power
that number and prints it.

Answer Posted / nitish kumar choudhary

u have to define int as long unsigned int to increase its
size..
normally int cant give u the answer.

void main()
{
long unsigned int res;
int a;
printf("Enter the 5 digit no.: ");
scanf("%d" ,&a);
printf("result is: %uL", a*a);
getch();
}

Is This Answer Correct ?    3 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What do you mean by a sequential access file?

1089


What is the difference between call by value and call by reference in c?

1169


Can I use base-2 constants (something like 0b101010)? Is there a printf format for binary?

1009


Why should I prototype a function?

1209


What is the purpose of the preprocessor directive error?

1279


In c language can we compile a program without main() function?

1145


Can you apply link and association interchangeably?

1130


What do you mean by scope of a variable in c?

1017


Explain high-order bytes.

1127


Explain what would happen to x in this expression: x += 15; (assuming the value of x is 5)

1286


What is the difference between new and malloc functions?

1139


What happens if header file is included twice?

1154


What is a stream?

1155


How can you increase the size of a dynamically allocated array?

1198


How many loops are there in c?

1118