Results 1 to 3 of 3

Thread: Is there srand() in C or C++

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

    Is there srand() in C or C++

    Is there something called srand() in C or C++. If so what is the usage of this. Has it got the same functionality as rand().


  2. #2
    Contributing Member
    Join Date
    May 2006
    Answers
    71

    Re: Is there srand() in C or C++

    There is function called as srand() in C which is used to seed the random sequence generated by |rand()|.


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

    Re: Is there srand() in C or C++

    To add to this discussion the syntax of srand() is given below
    void srand( unsigned seed );
    If you use this function srand() then the header file called as stdlib.h has to be included


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