As Wikipedia states Project Euler is a website dedicated to a series of computational problems intended to be solved by computer programs. Project Euler is a place for mathematicians, programmers and problem solvers who are passionate about solving problems. It contains 450+ programming challenges all of varying difficulty level. All problems can be solved in any programming language.

What makes Project Euler so special and difficult is the time restriction to solve a problem and the huge data range. Each problem must be solved withing few minutes (Less than 1 minutes if using C programming language).

Here I am providing basic idea and logic behind various Project Euler problems with full source code in Java. But always do remember one thing as also mentioned by Project Euler

What makes Project Euler so special and difficult is the time restriction to solve a problem and the huge data range. Each problem must be solved withing few minutes (Less than 1 minutes if using C programming language).

Here I am providing basic idea and logic behind various Project Euler problems with full source code in Java. But always do remember one thing as also mentioned by Project Euler

which data type is to be used to calculate 2 raise to the power 1000?

ReplyDeletelong

ReplyDelete"long long int " or "lomg float"

ReplyDelete"long long int " or "lomg float"

ReplyDeletethen what we can write in long long int? mean i'm taking about %d,%ld???

ReplyDeleteFor long long int %lld is used. Learn more about list of all format specifiers in c

Delete%lld bro

DeleteSo what really do pointers do?

ReplyDeletepointers store the address of a variable in simple words... there are various use of pointers depending on various situation.learn more about pointer http://www.tutorialspoint.com/cprogramming/c_pointers.htm

Deletecan a macro be used as a variable name?

ReplyDeleteex:

#define ONE TWO

#define TWO ONE

main()

{

int ONE=1;

int TWO=2;

printf("%d %d", ONE,TWO);

}

and why macro replacement is not done here

Hello @Chandra mouli, you cannot use a macro as a full fledged variable. Variable has few properties that macro doesn't supports such as -

Delete1. Value of macro once initialized cannot be altered.

2. You cannot point a pointer to the macro.

3. Macro are defined at compiled time. While your variables are declared and allocated in memory at runtime.

There are few more properties that macro doesn't supports. Hence you cannot use a macro as full fledged variable. But you can use it as a constant variable.

thank you....

Delete