Categories:
.NET (357)
C (330)
C++ (184)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (2)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
How can I open files with names like ...
How can I open files with names like ``file1'', ``file2'', ``file3'', etc., where the numeric part is controlled by a variable? Basically I want ``file%d'', like printf..
✍: Guest
You want printf's close cousin sprintf, which ``prints'' to a string:
char filename[FILENAME_MAX];
sprintf(filename, "file%d", i);
fp = fopen(filename, "r");
2015-10-07, 1541👍, 0💬
Popular Posts:
.NET INTERVIEW QUESTIONS - What is COM ? Microsoft’s COM is a technology for component software deve...
How To Select All Columns of All Rows from a Table? - MySQL FAQs - SQL SELECT Query Statements with ...
What are the types of variables x, y, y and u defined in the following code? #define Atype int* type...
What is the difference between Session State and ViewState? ViewState is specific to a page in a ses...
How To Recover a Dropped Index? - Oracle DBA FAQ - Managing Oracle Table Indexes If you have the rec...