Answer to Question #249141 in Java | JSP | JSF for hatipo

Question #249141

1.Write and build your C program which creates a txt file and write into your name and your number 10 times. (You can use FileIO.pdf samples or you can write it on your own ). 2. And use yourprogram.exe file in another process in createProcess method as parameter. Example: bRet=CreateProcess(NULL,"yourprogram.exe",NULL,NULL,FALSE,0,NULL,NULL,&si,&pi); 3. Finally you should submit two C file 1 yourprogram.c (which creates a txt and write into your name and your number 10 times.) 2 mainprogram.c 


1
Expert's answer
2021-10-09T16:53:39-0400
#include <iostream>
#include <fstream>

using namespace std;

int main() {

    fstream file;
    file.open("output.txt");
    cout << "Enter your username:" << endl;
    string username;
    cin >> username;
    file << "Username: " << username << endl;
    file.close();
    return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS