It's UWAweek 47

help2002

This forum is provided to promote discussion amongst students enrolled in CITS2002 Systems Programming.
Please consider offering answers and suggestions to help other students! And if you fix a problem by following a suggestion here, it would be great if other interested students could see a short "Great, fixed it!"  followup message.
Displaying selected article
Showing 1 of 828 articles.
Currently 84 other people reading this forum.


 UWA week 43 (2nd semester, study break) ↓
SVG not supported

Login to reply

👍?
helpful
5:25pm Wed 23rd Oct, ANONYMOUS

For give my poor English, this question really confused me:

You are asked to write a C11 function to locate and print all potential trojan- horse programs found via a user’s “PATH” environment variable. The C11 function should have the prototype: int find potential trojans(char *testpath); If there are 3 executable programs named “ls” and 2 named “cp” that can be found via a “PATH” environment variable, then the function will print the full pathnames of all 5 programs, and return the integer 5 to indicate the number of suspicious programs found.

Does that mean: if there are EXACTLY 3 executable programs named “ls” and 2 named “cp” the function returns 5, all other situations, it returns 0 or something?

OR, if there are 1 lses, and 1 cps, it will return 2 if there are 2 lses, and 1 cps, it will return 3 if there is no lese, no cps, it return 0?

The University of Western Australia

Computer Science and Software Engineering

CRICOS Code: 00126G
Written by [email protected]
Powered by history
Feedback always welcome - it makes our software better!
Last modified  8:08AM Aug 25 2024
Privacy policy