create text file in /tmp folder in Linux using c language -


सी भाषा का उपयोग करके मुझे / tmp निर्देशिका में एक टेक्स्ट फाइल बनाने की आवश्यकता है, लेकिन मैं पता नहीं यह कैसे करना है क्या कोई है जो जानता है कि / tmp फ़ोल्डर में एक टेक्स्ट फ़ाइल कैसे बनानी है?

< पी> से लिया गया
  #include & lt; stdio.h & gt; int main () {FILE * pFile; PFile = fopen ("/tmp/myfile.txt""""); अगर (pFile! = NULL) {// लिखना fclose (pFile); } वापसी 0; }   

यदि /tmp/myfile.txt नहीं है तो कोई भी नहीं बनाया जाएगा।

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

c# - passing input text from view to contoller with FacebookContext using Facebook app -

Calling a C++ function from C# by passing a string with variable size to it -