LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-28-2009, 10:56 AM   #1
compufreek
LQ Newbie
 
Registered: Jan 2009
Posts: 2

Rep: Reputation: 0
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.
 
Old 01-28-2009, 11:19 AM   #2
mrrangerman
Member
 
Registered: Oct 2007
Location: MI
Distribution: Debian Slackware
Posts: 528

Rep: Reputation: 50
man vi Demo
man vim
man touch
www.cprogramming.com
man scp

Last edited by mrrangerman; 01-28-2009 at 11:23 AM. Reason: add info
 
Old 01-28-2009, 11:29 AM   #3
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,232
Blog Entries: 5

Rep: Reputation: 190Reputation: 190
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.

Last edited by farslayer; 01-28-2009 at 11:31 AM.
 
Old 01-28-2009, 12:52 PM   #4
compufreek
LQ Newbie
 
Registered: Jan 2009
Posts: 2

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by farslayer View Post
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.
 
Old 01-28-2009, 01:14 PM   #5
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
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.

Last edited by pixellany; 01-28-2009 at 02:09 PM.
 
Old 01-29-2009, 05:25 PM   #6
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,062

Rep: Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893
...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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help for Windows cmd commands into Linux terminal commands. windowsNilo Linux - General 2 07-01-2008 06:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:41 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration