Search:

Type: Posts; User: trish

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    6
    Views
    1,665

    or is it that we cant typecast structure to...

    or is it that we cant typecast structure to integer ???
  2. Replies
    6
    Views
    1,665

    but how is this possible .. i mean as far as i...

    but how is this possible .. i mean as far as i know structure variables are stored in contiguous memory locations .. or if not being in contiguous memory locations is the problem and NOTHING ELSE...
  3. Replies
    14
    Views
    5,050

    run 2 for loops one nested in another outer 1...

    run 2 for loops one nested in another
    outer 1 for height inner 1 for width ... read it as a byte in character .. use & operator .. negate it .
  4. Replies
    6
    Views
    1,665

    BitFields -- is this possible?

    Hello everyone,
    BitFields gives us the liberty to decide how many bits to allot for the particular field.
    ex.


    struct x
    {
    unsigned a:1;
    unsigned b:2;
    unsigned c:3;
  5. Replies
    5
    Views
    1,085

    so in 2D array is (arr+0) and *(arr+0) same ??

    so in 2D array is (arr+0) and *(arr+0) same ??
  6. Replies
    5
    Views
    1,085

    but even *(arr+0) returns the address of 0th 1 D...

    but even *(arr+0) returns the address of 0th 1 D array then how is it different from (arr+0) which according to you returns the address of 0th 1D array again as well ?? :O
  7. Replies
    5
    Views
    1,085

    pointers to 2 D arrays

    say i have a 2D array

    int arr[5][2] = {
    {1,2},
    {3,4},
    {5,6},
    {7,8},
    {9,10} };

    now if i say arr[0].. its internally treated as *(arr+0)
  8. Replies
    24
    Views
    8,932

    Structures as members of structures & offset

    void main()
    {
    struct a
    {
    struct b
    {
    int i;
    float f;
    }x;
  9. Replies
    2
    Views
    863

    Thanks :)

    Thanks :)
  10. Replies
    2
    Views
    863

    2 - D arrays & pointers

    Here is a code snippet :


    int a[2][2] = {
    {7, 12},
    {2, 7}
    };

    printf("\n%u %u %u", a + 1, *(a + 1), a[1]);
  11. Replies
    9
    Views
    1,360

    I meant the human readable int * p as a normal...

    I meant the human readable int * p as a normal pointer & the vague looking (int * p)[2] as the weird one :biggrin:
  12. Replies
    9
    Views
    1,360

    How exactly is a normal pointer any different...

    How exactly is a normal pointer any different from a pointer to an array ? Any array, even a multidimensional one, even when its sub arrays are extracted, would yield a base address...why can't a...
  13. Replies
    9
    Views
    1,360

    p = s[i] will work just fine & I am also aware of...

    p = s[i] will work just fine & I am also aware of the syntax needed to access a particular element as pointed out. My question though, is about the statements commented out as alternatives 1 & 2 and...
  14. Replies
    9
    Views
    1,360

    Pointers and 2-D arrays

    Consider the following piece of code :


    int s[4][2] = {
    {1, 2},
    {3, 4},
    {5, 6},
    {7, 8}
    };
  15. Replies
    7
    Views
    2,288

    To be honest, I don't know how to do that :o but...

    To be honest, I don't know how to do that :o but I will give it a try...but you do agree then that the output should be garbage ?
  16. Replies
    7
    Views
    2,288

    Local variables popped from stack or is it ?

    void main()
    {
    int * j = fun();

    printf("%d", *j);
    }

    int * fun()
    {
    int k = 35;
  17. Replies
    4
    Views
    899

    Got it...Thanks a lot guys !

    Got it...Thanks a lot guys !
  18. Replies
    4
    Views
    899

    I still don't get it :o

    I still don't get it :o
  19. Replies
    4
    Views
    899

    Recursion woes...

    These are 2 slightly different versions of a recursive program for factorial :-


    int fact(int x)
    {
    if(x == 1)
    return 1;
    else
    return x * fact(x--);
    }
  20. Agreed I am sure your knowledge of the C...

    Agreed



    I am sure your knowledge of the C programming language is far superior than mine but the condescending tone make you sound like a real jerk. I posted this question here because I had a...
  21. The program is compiled using turbo c (I know...

    The program is compiled using turbo c (I know ancient compiler & the usual shenanigans but...) & runs error free. The output is this :

    Candidate 1 - itemsets

    0 : I1
    1 : I2
    2 : I5
    default :...
  22. Stuck on a module for implementing apriori algorithm

    Hey !

    Folks, need some help with a module that am writing...

    I have a simple text file with transactions like these :

    T100-I1,I2,I5
    T200-I2,I4
    T300-I2,I3
    T400-I1,I2,I4
  23. Replies
    2
    Views
    1,346

    Never mind, figured out the first one as...

    Never mind, figured out the first one as well...this one's got to be the most narcissist thread ever :D
  24. Replies
    2
    Views
    1,346

    I figured out the second problem i.e., the issue...

    I figured out the second problem i.e., the issue of the monster not being seen : had forgotten the call to grid function (similar to the one used for pacman)...<duh>
    But, the first problem, that of...
  25. Replies
    2
    Views
    1,346

    My dos pacman blues

    I have gotten thus far in my pacman game in dos:

    1) The maze rendered
    2) The pacman moved in the maze (along with collision detection with the walls)
    3) Pills swallowed by pacman & score...
Results 1 to 25 of 43
Page 1 of 2 1 2