ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Write a C/C++ program that first finds out all the users who are currently logged in. It then prints out the user name and the IP address of the terminal from where each user is logged in. The program should not print your own username and IP address. If there is currently no user logged in, your program should display an appropriate message.
/me takes a puff from his smoking pipe.
"Hmmm, Mr Watson."
"Yes Sherlock?"
"The question to ponder is, is this an elaborate cover story to complete the poster's work?"
"What information do we know about Miss Lazy?"
"That she is lazy Mr Watson!"
"By Jove Holmes, you're right! Does this mean that this is all an elaborate hoax to cover up the fact that the poster has been to parties and soirees instead of completing her assignment?"
"You know my methods Watson, apply them."
ok if you want me to change the question to make sure that is not an asigment i will change it
here take the other question
Write a C/C++ program to implement a user-friendly Linux command interface. The program should provide a menu of commonly used commands (such as ls, pwd, ps, date, cal, cat, cd, mkdir, rmdir, wc, etc). When the user selects one of the commands, either the command is executed if the commands doe not require any additional options or asks for additional input/information. If the commands requires options/switched (such as –l for ls), the program should display some of the commonly used options/switches for the user to select one before executing the command. If a command needs some user input (for example, file name for cat command) the program first gets the required input and then executes the command. Program should have an option to Exit to exit from it.
To dispell the impression that you are simply asking homework question, I suggest you publish evidence that you actually know some of this stuff. Also, why not share with us where you are teaching?
Miss Lazy,
if you want people to jump on board and set out to see with you. i believe you must give us some reliable information to trust you with the claim you made. Otherwise we just think that you need the buoy to save you from drowning.
Miss Lazy,
As a bona fide OS teacher, please complete the following sequence: A, B, ____. Clue, the answer is neither C, or C# (just in case you are musically minded and imagine that I am thinking in whole tones) but your classmates will be able to tell you what it is without any great difficulty.
BTW, just what good are these 'points' that one would earn by giving the correct answer? Are they redeemable for cash or certain favors? Are they only valid to you Miss Lazy, or could one 'spend' them other-wise?
Surprisingly enough those "assignments" are quite similar to others I've seen on the web, posted by people who should be doing them as their homework but instead cry out loud for somebody else to do them for them. It could be a coincidence that you're "assigning us" such things that are known to be usual homework assignments, but to me it sounds like too big a coincidence.
Of course you can change the "assignment", because you may have several of them to solve, but it doesn't change the fact that you should do them yourself.
EDIT: in addition, if we thought that you actually were doing this because of what you claimed, it would still not make any sense. Posting the answers, full code pieces, of things that are very close to homeworks people are asking ready answers for here..I think it's equally bad as making other people's homework for them - they don't learn anything in the process.
Has it occurred to you guys and gals that Miss Lazy is long gone? Actually, it is rare for a homework troll such as this to post more than once. (But then, her approach was a bit more imaginative than most...)
Interesting how many long threads are kicked off by an OP who only posts once and is seldom--if ever--heard from again.
We've made some really good points to Miss Lazy, but she's not listening......Her e-mail is linked in her profile--let's all start writing her letters.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.