Click here to Skip to main content
15,878,871 members
Please Sign up or sign in to vote.
1.20/5 (5 votes)
See more:
Q9:Difference between (in a tabular form)…FUNCTION & MEMBER FUNCTION?
Q10:NAME THE FUNCTION THAT ENABLES A FILE POINTER TO SET IT FOR WRITE OPERATIONS?
Posted
Updated 8-Mar-11 2:26am
v2
Comments
Pravin Patil, Mumbai 8-Mar-11 8:27am    
Added the Homework Tag to the question.......
Wild-Programmer 8-Mar-11 8:37am    
LOL Homework :)
Sergey Alexandrovich Kryukov 8-Mar-11 14:40pm    
So true.
--SA
CPallini 8-Mar-11 9:10am    
Your Google's batteries are down, please recharge them and try again.
Sergey Alexandrovich Kryukov 8-Mar-11 14:36pm    
Great reply. Proposed as answer :-)
--SA

1 solution

i. A function has a global or local scope depending on coding, a member function belongs to a class/structure and access qualifiers denote its behavior.

ii. FILE *fp=fopen("myfile.txt","wt"); // "wt" stands for write text
fprintf(fp,"Hello world !\n\r") // writes "Hello world !" in myfile.txt
fcolse(fp); // closes file
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900