top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What should be the precautions we should take while writing the preprocessor statement i.e. #define in C?

0 votes
826 views

Lot of confusion and lot of scattered info, can someone help me by providing to the point response.

posted Jul 8, 2014 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

I saw only two use of #define. First it is used to define constant and second to define macro function.

  1. When macro should be defined before it's uses start.
  2. Some macros are already defined by compiler, avoid to redefine them.
  3. Take care of parenthesis while defining macro function.

If you have any specific question then please post your question.
I will try to answer your query.

answer Jul 9, 2014 by Rupam
Similar Questions
+1 vote

My code compiles even without inclusion of stdio.h, any suggestion on best practices?

+1 vote

Are there any defined rules that should be considered while writing function definition ?

+3 votes

http://en.wikipedia.org/wiki/Relational_database_management_system

There are Database Backup and restore utilities for RDBMS Systems.
The Backup program generates a (.Bak) Binary File as output which can later be restored in case the Database crashes.

What could be the Algorithm/s in database backup/s and restore programs ?. i.e. C/C++ Programming logic/Algorithm.

...