Click here to Skip to main content
15,893,381 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How can we store a large value like 2^999 in C Language?
Posted
Updated 18-Sep-10 6:55am
v2
Comments
Richard MacCutchan 18-Sep-10 15:52pm    
Use a float or double.
Emilio Garavaglia 19-Sep-10 2:45am    
You should also specify how much precision do you need.
To represent THAT sole single value, 1 bit is sufficient.
Ajay Vijayvargiya 27-Sep-10 14:58pm    
Funny answer: int n = 2^999; is valid!
Serious question: Why do you need that?

A safe way is to use a decent big integer c++ library, just go and google.
 
Share this answer
 
v2
What about using a Linked List !?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900