[ Home  |  FAQ-Related Q&As  |  General Q&As  |  Answered Questions ]


    Search the Q&A Archives


1. Write a function check_exist() to check if a specified...

<< Back to: comp.lang.c Answers to Frequently Asked Questions (FAQ List)

Question by modin
Submitted on 3/27/2004
Related FAQ: comp.lang.c Answers to Frequently Asked Questions (FAQ List)
Rating: Not yet rated Rate this question: Vote
1. Write a function check_exist() to check if a specified file exists or not . This function assumes that the filename to check for is stored in a global variable NAME which is defined as char NAME[13];
The function must return 'y' if the file in NAME exists ,else it should return 'n'

2. Write a function db_name() that prompts the user to enter a database filename and stores the name in the global variable NAME. Write another function that uses the function db_name and check_exist() to accept only names of files that exist.The user must be provided with some help about the files in the directory.

3. Write a function pad() to prefix blanks to the contents of a string of a specified width, so that the contents are justified right in the string.


Your answer will be published for anyone to see and rate.  Your answer will not be displayed immediately.  If you'd like to get expert points and benefit from positive ratings, please create a new account or login into an existing account below.


Your name or nickname:
If you'd like to create a new account or access your existing account, put in your password here:
Your answer:

FAQS.ORG reserves the right to edit your answer as to improve its clarity.  By submitting your answer you authorize FAQS.ORG to publish your answer on the WWW without any restrictions. You agree to hold harmless and indemnify FAQS.ORG against any claims, costs, or damages resulting from publishing your answer.

 

FAQS.ORG makes no guarantees as to the accuracy of the posts. Each post is the personal opinion of the poster. These posts are not intended to substitute for medical, tax, legal, investment, accounting, or other professional advice. FAQS.ORG does not endorse any opinion or any product or service mentioned mentioned in these posts.

 

<< Back to: comp.lang.c Answers to Frequently Asked Questions (FAQ List)


[ Home  |  FAQ-Related Q&As  |  General Q&As  |  Answered Questions ]

© 2008 FAQS.ORG. All rights reserved.