LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Some linux commands (https://www.linuxquestions.org/questions/linux-newbie-8/some-linux-commands-700537/)

compufreek 01-28-2009 10:56 AM

Some linux commands
 
Sorry but i really dont know where should i put this thread :shy:

This is my homework assigment, but i really dont know the last few answears. Im using putty to get an acess to another computer.

1. With editor called vi i need to make a file called smtn.c and with programming language C (not C++) i need to write a function for multiplication of two int variables with help of sumtotal(not really shure about the word but you know 1+1 :)) , without the use od division(/) or multiplication(*) . In main program i must demonstrate this function so that the program takes two parameters in command prompt. For conversion from string to int use function atoi and then write out the produkt. Run program with command ./a.out . Then with a program valgrind check if the program is working correctly.

2. In file 'smtn2.txt'write down the name of the process pid 2.

3.ant the last one is to get the file from that computer and put it back on mine.

mrrangerman 01-28-2009 11:19 AM

man vi Demo
man vim
man touch
www.cprogramming.com
man scp

farslayer 01-28-2009 11:29 AM

Read the Linuxquestions.org Forum Rules, they specifically state that you are not to use this site to solve your homework problems. If we do your homework for you how will you ever learn the material yourself ?

Quote:

Do not expect LQ members to do your homework - you will learn much more by doing it yourself.

compufreek 01-28-2009 12:52 PM

Quote:

Originally Posted by farslayer (Post 3424194)
Read the Linuxquestions.org Forum Rules, they specifically state that you are not to use this site to solve your homework problems. If we do your homework for you how will you ever learn the material yourself ?

im sorry i didnt expect you to solve my homework but just tips i could use to solve it ... I didnt really express myself correct since my english is bad.... i forgot to write that i tried the man functions but i dont understand anny of the manuals linux provides so i asked in the forums for links to places where this would be better explained.

pixellany 01-28-2009 01:14 PM

You CAN get homework help here.......The rules state only that you should not expect it.

The way to avoid the negative reactions is to show the work you have done or to ask specific questions.
Quote:

i tried the man functions but i dont understand anny of the manuals linux provides
What you need to do is tell us what specifically you don't understand. Take any one of the man pages recommended by mrrangerman and tell us which part you don't understand.

salasi 01-29-2009 05:25 PM

...and I'll also point out that you don't actually ask a question. But ignoring that...

Quote:

i need to write a function for multiplication of two int variables with help of sumtotal(not really shure about the word but you know 1+1 ) , without the use od division(/) or multiplication(*)
The important question here is whether, ignoring the fact that you are using a computer, can you work out a process (algprithm, if you want to be technical) to produce the effect of multiplication with actual multiplication? If you can't, you need to think about what multiplication is. Maybe consider what 'doubling' (multiplication by two) does. Can you generalise that so that you can multiply by other numbers?

If that doesn't work, books are good too. Unless you solve that, whatever you do with the computer won't help you much.


All times are GMT -5. The time now is 05:32 PM.