• +91 9723535972
  • info@interviewmaterial.com

C Interview Questions and Answers

Question - How are portions of a program disabled in demo versions?

Answer - If you are distributing a demo version of your program, the preprocessor can be used to enable or disable portions of your program. The following portion of code shows how this task is accomplished, using the preprocessor directives #if and #endif: int save_document(char* doc_name) { #if DEMO_VERSION printf(Sorry! You can’t save documents using the DEMO version of this programming); return(0); #endif ... }

Comment(S)

Show all Coment

Leave a Comment




NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners