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.
I am an new C programmer, (yes i know its old), and i need some help with a basic program mainly using printf
ill use this example:
main()
{
printf("Programming is fun!")
printf("and Programming in C is more fun")
}
but, how do i make the terminal print out "Programming is fun!", then wait 5 seconds and print out "and Programming in C is more fun"?
i dont know if it matters, but i am using Linux
Last edited by ieatsplaydoh; 04-30-2007 at 09:10 PM.
um...
what?
as osor said, is that supposed to be a joke.
i am using a very old C book from the 80's
i am still in the first chapter.
i dont understand ANY of that code you just put there.
anything simpler would be appreciated
I don't think you are supposed to understand that.. yet.
If you want to know what those syscalls are doing, I highly recommend getting "Advanced Programming for the Unix Enviroment". The author explains stuff far better than I would.
I don't think you are supposed to understand that.. yet.
If you want to know what those syscalls are doing, I highly recommend getting "Advanced Programming for the Unix Enviroment". The author explains stuff far better than I would.
thanks
ill get that from the library cause i can be a tightwad
i learned all i know about linux from the library too
Nah; at least, I didn't think it was a very funny one. A good one would have been if I'd written how to use the OCaml FFI to interact with C code that slept. No, the OP already had his answer, so I described another (more flexible) way to solve the problem. I did preface it with a statement saying that he wouldn't understand it yet... just know that it's possible to have a function called recurrently inside your code according to a timer.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.