Search:

Type: Posts; User: pinko_liberal

Page 1 of 12 1 2 3 4

Search: Search took 0.02 seconds.

  1. Replies
    15
    Views
    2,066

    yes.

    yes.
  2. Replies
    15
    Views
    2,066

    From 6.5.4.2 Looking up the forward...

    From 6.5.4.2


    Looking up the forward reference


    In this case, the casting you suggested seems necessary.
  3. Replies
    15
    Views
    2,066

    It seems to change the pointer to point to a...

    It seems to change the pointer to point to a location one byte away from the previous location, it doesn't seem to be normal pointer incrementation.
  4. Replies
    17
    Views
    2,828

    Please read the webpage Representing a...

    Please read the webpage


    Representing a pointer is not the same as being a pointer.

    If plah is a pointer you can assign values to it, why don't you try doing something like



    int...
  5. Replies
    2
    Views
    2,122

    If she reads in characters from a stream till...

    If she reads in characters from a stream till she gets an EOF. I don't see any problem whatsoever.
    [added later]
    My bad, the function has to take in a string.
  6. Replies
    17
    Views
    9,765

    It is easy to get floating point random numbers...

    It is easy to get floating point random numbers from rand() .


    #include <stdio.h>
    #include <stdlib.h>

    int
    main(void)
    {
    unsigned int seed=123;
  7. Replies
    9
    Views
    1,893

    lcc isn't that bad a compiler. The probability of...

    lcc isn't that bad a compiler. The probability of your being wrong is greater than lcc being broken.
  8. Replies
    17
    Views
    2,828

    No, plah is an array. sizeof plah =...

    No, plah is an array.
    sizeof plah = 5*sizeof(int) which in all probability will be larger than sizeof(int *)
    try this out


    #include <stdio.h>

    int
    main(void)
    {
  9. Put it in a do while loop #include ...

    Put it in a do while loop


    #include <stdio.h>
    #include <ctype.h>

    int main (void) {

    char response;
  10. Replies
    0
    Views
    873

    Bounds-checking extension to gcc

    Interesting.
    http://www.network-theory.co.uk/articles/boundschecking.html
  11. Replies
    5
    Views
    1,070

    Is there anything wrong in the code to allocate...

    Is there anything wrong in the code to allocate arrays of a particular length below. I have never returned pointer to arrays before so I wanted to be sure.



    #include <stdio.h>
    #include...
  12. Replies
    19
    Views
    2,382

    fgetc() returns an int, EOF is usually an int...

    fgetc() returns an int, EOF is usually an int value that cannot be represented as a char, so you might end up with an infinite loop unless you declare ch as a int.
  13. Replies
    12
    Views
    1,434

    Try printf("%d",*p_map);

    Try


    printf("%d",*p_map);
  14. Replies
    3
    Views
    1,780

    They are also a part of trigraphs, some special...

    They are also a part of trigraphs, some special sequences of three characters (most probably you won't ever need to use trigraphs)...
  15. Replies
    19
    Views
    2,382

    Your code original code worked?

    Your code original code worked?
  16. Replies
    12
    Views
    1,667

    Comparing a pointer to NULL and comparing a...

    Comparing a pointer to NULL and comparing a pointer to zero are equivalent,
    so, if fp is a FILE * , then
    if(fp==0) and if(fp==NULL) are testing the same thing

    if(fp) (which is equivalent to...
  17. Replies
    34
    Views
    5,839

    To explain what I have done is I calculate...

    To explain what I have done is
    I calculate C(n+1,r+1) from C(n,r) using the formula

    C(n+1,r+1)= (n+1)*C(n,r)/(r+1)

    I break up C(n,r)=q(r+1)+rem
    where

    0<=rem<=r
  18. Replies
    34
    Views
    5,839

    Even C(68,34)=28453041475240576740 is greater...

    Even C(68,34)=28453041475240576740
    is greater than 18446744073709551615 = ULLONG_MAX
    by a factor of 1.5

    The largest C(2n,n) that fits into a unsigned long long is C(66,33)
    Assuming usigned...
  19. Replies
    34
    Views
    5,839

    Dude, what is the sizeof(unsigned long long) on...

    Dude, what is the sizeof(unsigned long long) on your system,
    C(70,35)= 112186277816662845432
    ULLONG_MAX= 18446744073709551615 (on my system) :confused:
    C(70,35) > ULLONG_MAX :confused:
  20. Replies
    34
    Views
    5,839

    For my code its (64,32) so you are squeezing five...

    For my code its (64,32) so you are squeezing five more bionomial sequences.
    Not bad!!! Good work!!!
  21. Replies
    34
    Views
    5,839

    Thantos, What is the smallest value of C(2n,n)...

    Thantos,
    What is the smallest value of C(2n,n) for which your method fails?
  22. Replies
    12
    Views
    1,950

    thanks! That explains it.

    thanks! That explains it.
  23. Replies
    12
    Views
    1,950

    sizeof's are coming to be 8.

    sizeof's are coming to be 8.
  24. Replies
    12
    Views
    1,950

    I did cast the results to unsigned long long in...

    I did cast the results to unsigned long long in an attempt to make it work, it didn't help.
  25. Replies
    12
    Views
    1,950

    .file "junk.c"...

    .file "junk.c"
    .def ___main; .scl 2; .type 32; .endef
    .text
    LC0:
    .ascii "c=%llu b=%llu\12\0"
    .align 2
    .globl _main
    .def _main; .scl 2; .type 32; .endef
    _main:
    pushl %ebp
Results 1 to 25 of 291
Page 1 of 12 1 2 3 4