Search:

Type: Posts; User: edesign

Page 1 of 6 1 2 3 4

Search: Search took 0.01 seconds.

  1. Thanks laserlight. I followed the thread u...

    Thanks laserlight.

    I followed the thread u suggested and it works, though gcc gives me warning after compilation.

    Here's how my program look like


    int main()
    {
    int mat[3][3];
  2. Help with two-dimensional arrays and function

    Hi,

    I want to pass a two dimensional array by reference to a function and then manipulate it's content in the called function.

    I'm not sure about how to do it.

    If you can help...
    ...
  3. Replies
    9
    Views
    12,922

    If I use the approach suggested by iMalc, it will...

    If I use the approach suggested by iMalc, it will work well for part 1 but when the experiement is repeated it will generate the same set of 500 numbers each time. Just in a different order. But...
  4. Replies
    9
    Views
    12,922

    I want it to be uniformly distributed precisely....

    I want it to be uniformly distributed precisely. If I generate a histogram, I want it to be flat, same count for all the numbers. I need to generate the numbers in [0,1]. If rand generates same...
  5. Replies
    9
    Views
    12,922

    Ranom numbers having uniform distribution

    Hi,

    I need to generate 500 random numbers having uniform distribution. Does rand function ensure uniform distribution?

    Thanks,
    edesign
  6. Replies
    4
    Views
    2,793

    extern variable

    if a variable is declared as extern, for example
    extern int x;

    but it is not declared any where in any file then what will happen? Will x be allocated memory?
  7. Replies
    9
    Views
    4,234

    mtrace

    ok...if anyone using mtrace can suggest what may be the problem, it will be great help...
  8. Replies
    9
    Views
    4,234

    yes, I am running linux but to be precise I want...

    yes, I am running linux but to be precise I want to use this memory analyzer tool for an embedded application which uses MontaVista Linux Pro 2.1.

    Googling it, I got to know that MVPro has a...
  9. Replies
    9
    Views
    4,234

    Memory Analyzer Tool

    I need to have some memory analyzer tool which can detect memory leaks in a program (especially a multithreaded program)... is there any such tool available?
  10. Replies
    3
    Views
    5,859

    Variable names starting with _

    Hi,

    In many codes and projects, I find variable names, structure definition, headerfile names starting with _ (underscore sign). Is that supposed to mean anything? Are they treated in some...
  11. Thread: malloc doubt

    by edesign
    Replies
    17
    Views
    3,393

    ya, now buffer2 is pointing to the location...

    ya, now buffer2 is pointing to the location buffer1 used to. So I'll be able to free both the buffers (allocated memory) and that will no longer cause a memory leak.

    and i don't have any code, i...
  12. Thread: malloc doubt

    by edesign
    Replies
    17
    Views
    3,393

    I also thought that it must be causing a leak,...

    I also thought that it must be causing a leak, but was not so sure....

    Thanks... :)
    Edesign
  13. Thread: malloc doubt

    by edesign
    Replies
    17
    Views
    3,393

    malloc doubt

    what will happen if I have a piece of code like this

    buffer = malloc(some_amount);
    ........
    ........

    buffer = malloc(some_amount);


    I don't have a free statement in between, when a second...
  14. Replies
    9
    Views
    1,670

    I am no one to think that you people can't write...

    I am no one to think that you people can't write it ... I have learned everything on C board and I would encourage other people to do so .. the only reason I posted that piece of code is that after...
  15. Replies
    9
    Views
    1,670

    The loop may look something like this... ...

    The loop may look something like this...




    for(i=0; i<strlen(s1); i++)
    {
    for(j='a'; j< 'z'; j++)
    {
    if(s1[i] == j)
  16. Replies
    8
    Views
    1,471

    Thanks ... that was quite informative ... I...

    Thanks ... that was quite informative ... I enjoyed reading that
  17. Replies
    10
    Views
    1,123

    ya, this can help only if we are comparing with...

    ya, this can help only if we are comparing with constants , so it is better to practice not making a mistake rather than practicing to write wierd looking expressions... :)
  18. Replies
    10
    Views
    1,123

    well, it happens to me... also a < 3 is ok ,...

    well, it happens to me... also a < 3 is ok , there s no benifit of writing 3>a, but in case of a == 3 it is the asignment , we are talking about ...
  19. Replies
    10
    Views
    1,123

    ya, it may look awkward but believe me when you...

    ya, it may look awkward but believe me when you have a long code and by chance you make such a mistake it will take you hours to identify that ... where as in 3 == a.. compiler will make your life...
  20. Replies
    8
    Views
    1,471

    cool........ I didn't realize, that performs a...

    cool........ I didn't realize, that performs a swap.. , and I am surprised why I haven't come across XOR-swap till now...
  21. Replies
    8
    Views
    1,471

    What is the purpose of this program? It...

    What is the purpose of this program?
    It definitely does not perform a swap...whatever it does.. remove tmp, you'll still get the same result ...
  22. Replies
    8
    Views
    1,471

    In swap1 you are passing the arguements by...

    In swap1 you are passing the arguements by reference and hence the swap occurs, where in swap2 you are passing the arguements by value : that means i1 and i2 are created locally in scope of swap2 ,...
  23. Replies
    7
    Views
    103,120

    hey, I am still a newbie to this stuff, but...

    hey,

    I am still a newbie to this stuff, but I'm working on similar kind of stuff for a few days and as far as I've captured the things msgq is the best way to do that...(it may not be ... it is...
  24. Replies
    5
    Views
    7,752

    Funny Conversation

    I read it in a blog and found myself smiling at the end, finding such a new genre of humor...



    main(Episode_1)


    All variables appearing in this work are fictitious. Any resemblance to real...
  25. Replies
    12
    Views
    20,953

    Well, without knowing about arrays it would be...

    Well, without knowing about arrays it would be difficult...but looking at code's title that shouldn't be the case..what say...::D
Results 1 to 25 of 148
Page 1 of 6 1 2 3 4