answersLogoWhite

0


Best Answer

The term "magic" has its place in programming history, and generally referred to something that is either understood by those who are experts, or understood by no one, as to How It Works.

Magic numbers in C and other programming languages today have a number of meanings:

- a constant value used to identify a protocol or file formats (file signatures);

- unique identifiers unlikely to be mistaken to mean other things;

- values whose usages are unexplained.

Some interesting examples of magic numbers include:

- Java bytecode files start with 0xCAFEBABE, but compressed with "Pack200" the code becomes 0xCAFED00D (this is magical);

- image files start with unique identifiers like "GIF89a", "GIF87a", or begin and end with unique values;

- Mark Zbikowski designed the EXE file format, which starts with MZ (0x5A 0x4D), ensuring at least part of his name was burned into the annals of history;

- On older systems, newly allocated or freed memory was marked with the 32-bit hexadecimal value 0xDEADBEEF, and initializing memory came to be known in some circles as "deadbeefing the memory" or "the memory is deadbeef".

The related Wikipedia link below has a glut of information to sink your brain info regarding magic numbers.

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is magic number in c programming?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is c and c in computer programming?

C and C++ are both high-level programming languages.


Create a spiral in C programming?

create spiral in c programming?


What is c program to calculate product of all even numbers from entered number down to 1?

c is programming laungage


What has the author Robert Lafore written?

Robert Lafore has written: 'Object-oriented programming in Microsoft C++' -- subject(s): Object-oriented programming (Computer science), C++ (Computer program language), C. 'Microsoft C. Programming for the I.B.M.Personal Computer' 'Object-oriented programming in C++' 'Windows Programming Made Ridiculously Easy Book' 'The Waite Group's C Programming Using Turbo C++ (The Waite Group)' 'Microsoft C programming for the IBM' 'The Waite Group's Microsoft C programming for the PC' -- subject(s): C (Computer program language), IBM microcomputers, Microsoft C (Computer program), Microsoft C., Programming


When was C - programming language - created?

C - programming language - was created in 1972.


What is a C compiler as used in C programming?

In C programming, C compiler is user to translate C source into C object module.


What is the benefit of the C programming languages?

C language is better for hardware programming .Most of the programming for hardware are written in C language so it is beneficial for hardware programming is not efficient for application programming due to drawback like in C data moves around the system.


Name of object oriented programming language?

C++ is the name of a programming language.


Where can one find C programming tutorials?

You can find C programming tutorials online at the C programming website. They provide both free and paid tutorials for many aspects of the C and C++ code.


Websites to download c C programming language books?

Download 1000s of C C C++ Programming Language. http://www.guruengineers.com


What is the C programming of check the prime number with flow chart?

flow t prime numberchar


What programming language is Android written in?

Android is programmed in the C and C++ programming language.