LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Closed Thread
  Search this Thread
Old 10-28-2007, 12:27 PM   #1
Evelyne
LQ Newbie
 
Registered: Oct 2007
Posts: 4

Rep: Reputation: 0
help me URGENT PLZ


hi
I need an answer for the following questions after I have managed to get the first two sets of programs to run correctly:

Power 1:
#include <stdio.h>
#include <stdlib.h>
#include <math.h>

int main()
{
int num1,num2;


printf("Enter a number: ");
scanf("%d", &num1);

for(num2 = 0; num2 < 9; num2++)
{
printf("power %d: %d\n", num2, ((int)(num1/pow(2, num2))));
}

return;
}





power2 :
#include <stdio.h>
#include <stdlib.h>
#include <math.h>

int main()
{
int num1,num2,num3;


printf("Enter a number: ");
scanf("%d", &num1);


for(num2 = 0; num2 < 9; num2++)
{
num3= num1>>num2;

printf("power %d: %d\n", num2, num3);

}
return;
}








1. How is the math library available within the file system?
2. What are the names of the files that correspond to the math library?
3. List at least two possible ways for linking against the math library.
4. Is there an alternative way for generating the "string-compare-2"executable file? If yes, describe it
 
Old 10-28-2007, 12:30 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
welcome to LQ.org... a few pointers...

1. do not shout (use capital letters)
2. do not demand urgent help from a voluntary community
3. use useful and informative thread titles
4. do not as for help with homework
5. say please and thankyou (well.. never hurt did it?)

due to point 4, this thread is being closed... you need to learn these things for yourself using course material and other resources provided for you. not expect others to help you cheat.

Last edited by acid_kewpie; 10-28-2007 at 12:31 PM.
 
  


Closed Thread

Tags
help


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
Urgent...plz help me!!! masudur_iiu Linux - General 6 08-17-2006 04:23 AM
Urgent!!!!plz Help jamal91 Linux - Newbie 16 07-04-2006 02:31 PM
help me out to the three questions plz? its urgent lexersrp Linux - General 2 01-22-2005 01:28 AM
ITS URGENT plz helppppp maruthi4u Programming 2 08-14-2004 02:21 PM
Plz help, urgent sunil_lc Linux - Networking 4 10-28-2003 12:30 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:26 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
Open Source Consulting | Domain Registration