add assignment pdf

This commit is contained in:
AAYUSH VATS VATS 2024-08-20 04:08:02 -07:00
parent dd0de524ac
commit 0be4252685
3 changed files with 2 additions and 0 deletions

Binary file not shown.

BIN
lab2/src/part1.out Executable file

Binary file not shown.

View File

@ -39,6 +39,7 @@ int main(int argc, char **argv)
else { else {
cout << "[" << pid << "]" << " didn't find\n"; cout << "[" << pid << "]" << " didn't find\n";
} }
// for(int i = search_start_position; i < search_end_position; ++i) { // for(int i = search_start_position; i < search_end_position; ++i) {
// if(!strcmp(buffer, pattern_to_search_for)) { // if(!strcmp(buffer, pattern_to_search_for)) {
// cout << "[" << pid << "]" << " found at" << " " << i << endl; // cout << "[" << pid << "]" << " found at" << " " << i << endl;
@ -47,6 +48,7 @@ int main(int argc, char **argv)
// } // }
// } // }
// if(find == 0) cout << "[" << pid << "]" << " didn't find\n"; // if(find == 0) cout << "[" << pid << "]" << " didn't find\n";
auto endmain = std::chrono::high_resolution_clock::now(); auto endmain = std::chrono::high_resolution_clock::now();
chrono::duration<double> mainduration = endmain - startmain; chrono::duration<double> mainduration = endmain - startmain;
cout << mainduration.count() << endl; cout << mainduration.count() << endl;