LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 04-15-2008, 09:13 PM   #1
dina3e
Member
 
Registered: Mar 2008
Location: Bangalore
Distribution: Enterprise Red Hat linux
Posts: 98

Rep: Reputation: 16
Smile c function path .


i just want to find out the c source code. but i am unable to find all these thing , i want to know the implemntation of some c function like printf and many other function.

where the functions source code resides???
 
Old 04-16-2008, 02:34 AM   #2
bkcreddy17
Member
 
Registered: Feb 2008
Location: India-Hyderabad
Distribution: RHEL and Fedora
Posts: 171

Rep: Reputation: 15
Wink you mean C Program?

Do you mean that you want to write a C Program on linux and run it?
Do this:
#yum install gcc*
or
#rpm -ivh gcc*

open vi editor and type the program.
#vi sample.c (file extention should be .c)
#include<stdio.h>
main(void)
{
printf("Welcome to the world of C");
}
---save the file (:wq)
#gcc sample.c
--it produces a file called a.out
#./a.out

Welcome to the world of C
(which is your out put)
 
Old 04-16-2008, 02:37 AM   #3
Zmyrgel
Senior Member
 
Registered: Dec 2005
Location: Finland
Distribution: Slackware, CentOS, RHEL, OpenBSD
Posts: 1,006

Rep: Reputation: 37
Just quessing but I think its something like /usr/include/ where the source is.
 
Old 04-16-2008, 09:37 PM   #4
dina3e
Member
 
Registered: Mar 2008
Location: Bangalore
Distribution: Enterprise Red Hat linux
Posts: 98

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by Zmyrgel View Post
Just quessing but I think its something like /usr/include/ where the source is.
what the path you mentioned , only the header files are present. i am looking for the source code of the all the function like sizeof(), memset() ,etc.. i just want to find that how the functions are written .
 
Old 04-16-2008, 11:07 PM   #5
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
As I understand it, all functions in the standard C library are in the GNU libc library. Source code can be downloaded from http://www.gnu.org/software/libc/.
--- rod.
 
  


Reply

Tags
path



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
Unix Function call to get executable's path vharishankar Programming 13 04-20-2010 12:53 PM
C function to get application path sibtay Programming 5 06-22-2005 05:45 AM
C function in linux Getting the installed path for a program alix123 Programming 9 01-05-2005 05:59 AM
A main can be changed by a function local without passing anything to the function? ananthbv Programming 10 05-04-2004 01:31 PM
Perl exec function in linux (and system-function) nazula Programming 1 04-19-2004 12:21 PM

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

All times are GMT -5. The time now is 06:28 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