Results 1 to 5 of 5

Thread: Functions in stdlib.h

  1. #1
    Contributing Member
    Join Date
    May 2006
    Answers
    85

    Functions in stdlib.h

    Can someone highlight me on the functions present in stdlib.h. I think there is a function called as system in stdlibh. Could someone tell the purpose or the usage of this function also?


  2. #2
    Expert Member
    Join Date
    May 2006
    Answers
    114

    Re: Functions in stdlib.h

    Norman I am not aware about the system function mentioned by you. Hope we get to know about this in discussion by someone. But I could tell some of the functions I am aware of present in stdlib.h . They are namely atoi, atof, atol, calloc, malloc, getenv, putenv. There are of course numerous other functions preset in stdlibh.


  3. #3
    Expert Member
    Join Date
    May 2008
    Answers
    100

    Thumbs up Re: Functions in stdlib.h

    system() is used to issue system command .
    it's prototype is present in stdlib.h
    on success it returns 0 else it returns a -1.
    System() accepts string as an argument
    it's prototype is :
    int system(const char *command);


  4. #4
    Junior Member
    Join Date
    Mar 2009
    Answers
    16

    Re: Functions in stdlib.h

    system() is present in stdlib.h
    ***********************************************
    It is used to execute subprocesss and commands inside a program.
    These are passed in the form of string as paramater.

    int system(const char *command);

    it will return -1 on faliure but behaviour may change under some conditions.
    *********************************************


  5. #5
    Contributing Member
    Join Date
    Jun 2010
    Answers
    55

    Re: Functions in stdlib.h

    Your handy C reference manual should list all of the library functions for each header; if it doesn't, get a better one (I use "C: A Reference Manual" by Samuel Harbison & Guy Steele, currently 5th edition).

    You can also find the list of library functions in the online draft standard (.pdf file); see section 7.20.4.6 for a description of the system() function.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact