Search:

Type: Posts; User: onebrother

Search: Search took 0.01 seconds.

  1. Replies
    3
    Views
    1,918

    thanks for your reply... is there any good...

    thanks for your reply...

    is there any good link on C tricky questions?
  2. Replies
    3
    Views
    1,918

    sizeof(struct) gives different values

    I have few structures, & I get different values for each structure's sizeof() operator in a 32-bit processor



    struct test1{
    int i;
    int j;
    char c;
    }
  3. Replies
    2
    Views
    1,175

    I think you should have an assignment operator...

    I think you should have an assignment operator (=), that is missing here.
  4. Replies
    2
    Views
    1,495

    C Book on bit programming

    Please suggest any good book on bit programming, especially for low level programming (like device driver)


    thanks
    Onebrother
  5. Replies
    2
    Views
    2,443

    thanks for your comment. I think this is one of...

    thanks for your comment. I think this is one of the standard way of declaring these arrays
  6. Replies
    2
    Views
    2,443

    array of pointers to an array pointers

    I have my data structures, one array of pointers(outer array), which in turn(each entry) again points to an array of pointers. How can I declare the outer & inner arrays. Can I make it (outer one) a...
  7. Replies
    5
    Views
    40,824

    in that case(64 bit processor) should not we get...

    in that case(64 bit processor) should not we get 8 bytes for sizeof(int) also?
  8. Replies
    5
    Views
    40,824

    size of an integer pointer

    I have a simple code here



    int i, *p;
    printf("sizeof i =%d, size of pointer =%d", sizeof(int), sizeof(p));


    I get 4 bytes for size of int & 8 bytes for size of pointer.
  9. Replies
    9
    Views
    20,858

    multiplying x by 3 using bit operation in general...

    multiplying x by 3 using bit operation in general as you explained is

    (x<<1) + x

    But say if I want to multiply (x=) 3 by 5 then how this will work?

    because left shifting 3 by 1 bit will...
  10. Replies
    9
    Views
    20,858

    thanks for your reply... what is the...

    thanks for your reply...

    what is the equivalent bit operation if I want to divide a number
    by 3, as right shift of a number by n bits is equivalent of dividing it by 2^n.
  11. Replies
    9
    Views
    20,858

    multiplication using bit operation

    Hi

    If I need to multiply a number by 2, I can left shift the number by 1 bit.
    because shifting left by n bits on a signed or unsigned binary number
    has the effect of multiplying it by 2^n (base...
  12. Replies
    2
    Views
    5,232

    arithmatic vs logical shift operation

    Hi

    Whenever we do the shift operation (left or right) how can we know
    that the shift operation is an arithmetic or logical shift operation?

    Can someone tell me about any url where I can get...
  13. Replies
    1
    Views
    2,713

    Macro expansion

    I came across a code segment in open source, its like



    #define pthread_exit(x)\
    do {\
    dbg("[%x] pthread_exit(" #x ")\n", pthread_self());\
    pthread_exit(x);\
    } while(0)
  14. Replies
    1
    Views
    3,799

    byte order change

    Is there any API in Linux for changing the byte order of a 64 -bit (long long) variable?

    Please comment....

    thanks
  15. Replies
    10
    Views
    20,245

    well I got lot of answers, even befor eposting...

    well I got lot of answers, even befor eposting here. But I was looking for something, in depth reply (from programmer's perspective)...unfortunately I dint get it here...I myself will find out & will...
  16. Replies
    10
    Views
    20,245

    memcpy Vs memmove

    What is the difference between memcpy and memmove? Which is more
    expensive & why?

    plz comment on this...

    thanks
  17. Replies
    3
    Views
    2,056

    C datatype, enumerator

    Hi

    Is there any method to restrict the enumerated variable in C to occupy only one byte? I am using gcc (GCC) versin 4.0.0...

    please comment

    thanks
  18. Replies
    3
    Views
    2,329

    Linux timer functions

    it should be

    gcc -lrt <filename>.c
  19. Replies
    3
    Views
    2,329

    Linux timer functions

    Yes I have included <signal.h> also
  20. Replies
    3
    Views
    2,329

    Linux timer functions

    Hi all

    In my application I'm using timer_create() & timer_settime() functions of linux.
    but while compiling it gives me undefined reference for these two functions. I think I need to include some...
  21. Replies
    2
    Views
    3,224

    bit fields in a structure

    Hi all

    I have a structure




    struct test {
    union test1{
    short int Version:4,
  22. Replies
    2
    Views
    8,845

    thanks for your valuable comment....

    thanks for your valuable comment....
  23. Replies
    2
    Views
    8,845

    Array boundary checking in C

    Hi All

    prog 1:


    int main(void)
    {
    int i;
    int arr[3];
    for(i=0;i<4;i++)
  24. Replies
    2
    Views
    3,031

    thanks for your repy....

    thanks for your repy....
  25. Replies
    2
    Views
    3,031

    typedefs in C language

    I have a doubt regarding typedefs in C

    lets take an example


    typedef struct{
    int i;
    }test;

    int main()
Results 1 to 25 of 25