Answer to Question #272968 in C++ for Baneen

Question #272968

write c++ program to create process and wait for 15 seconds then terminate it. path: "c:\\windows\\system32\\notepad.exe"


1
Expert's answer
2021-11-29T00:00:31-0500
#include <iostream>
#include <chrono>
#include <thread>
using namespace std;
  
int main()
{
    cout << "Hello I'm waiting...." << endl;
    this_thread::sleep_for(chrono::milliseconds(15000) );
    cout << "Waited 15000 ms\n";
}

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