Search:

Type: Posts; User: BEN10

Page 1 of 20 1 2 3 4

Search: Search took 0.03 seconds; generated 21 minute(s) ago.

  1. char name[] is an array of chars whereas char...

    char name[] is an array of chars whereas char *name points to a string literal whcih you can't change. It's read only marked by the OS.
  2. Replies
    2
    Views
    1,227

    Try pressing ALT+ENTER

    Try pressing ALT+ENTER
  3. Replies
    5
    Views
    6,745

    So the time complexity will be O(n)?

    So the time complexity will be O(n)?
  4. Replies
    5
    Views
    6,745

    Oh, now I think I got the mistake in my code...

    Oh, now I think I got the mistake in my code using static variable. Thanks.
    But can you tell me how to compute "O" for the code given by you. Also frankly speaking I'm getting problem in tracing...
  5. Replies
    5
    Views
    6,745

    total nodes in a tree

    I made a code to count the total number of nodes in a binary tree.


    int count(struct node *root)
    {
    static int i=0;
    if(root!=NULL)
    {
    count(root->left);
    i++;
  6. Replies
    3
    Views
    1,056

    -> requires pointer to the structure on it's left...

    -> requires pointer to the structure on it's left side, whereas the '.' operator requires a structure variable on it's left side not a pointer.
    Eg.


    struct book
    {
    int page;
    char name;
    float...
  7. Replies
    2
    Views
    2,757

    Why do you need pointer for that? It can be done...

    Why do you need pointer for that? It can be done using one loop only.
  8. Replies
    3
    Views
    4,663

    I dont know about anything else but remove the...

    I dont know about anything else but remove the '&' from the 2nd and 3rd scanf() calls.


    scanf("%s",fname);
    scanf("%s",lname);
  9. Thread: overflow...?

    by BEN10
    Replies
    10
    Views
    4,366

    For 2's complement, look here....

    For 2's complement, look here.
  10. Thread: overflow...?

    by BEN10
    Replies
    10
    Views
    4,366

    Let me explain it with a 16bit arithmetic. The...

    Let me explain it with a 16bit arithmetic. The value of INT_MIN for it will be -32768 and INT_MAX will be 32767. Thus when you negate INT_MIN you get 32768 but this can't be represented in it coz the...
  11. Replies
    4
    Views
    3,621

    I'm not getting any error or warning with the...

    I'm not getting any error or warning with the first code.
  12. Thread: c function error

    by BEN10
    Replies
    12
    Views
    2,136

    You cannot define a function inside another...

    You cannot define a function inside another function. You just call it there. You should also have a prototype declaration after the headers have been included.
  13. Replies
    7
    Views
    3,212

    @MK27 This (http://wiki.osdev.org/Stack) might...

    @MK27
    This might be of some help to you.
  14. Replies
    15
    Views
    2,366

    Ohhhhh......I was assuming it just an int.

    Ohhhhh......I was assuming it just an int.
  15. Thread: loop problem

    by BEN10
    Replies
    4
    Views
    1,405

    Since remainder==0 so the condition of while will...

    Since remainder==0 so the condition of while will become false and thus doesn't get executed.
  16. Replies
    15
    Views
    2,366

    Dont you think a * with (s->top) is illegal coz...

    Dont you think a * with (s->top) is illegal coz the value of top will be given by s->top if top is a member of struct having pointer s?
  17. Replies
    5
    Views
    1,562

    The *(related to pointer) operator is the "value...

    The *(related to pointer) operator is the "value at address" operator. So, whenever there is a pointer then you can use the * operator to find the value at the address pointed to by the pointer.
  18. Thread: NULL vs. 0

    by BEN10
    Replies
    21
    Views
    6,935

    Here...

    Here
  19. Replies
    3
    Views
    2,013

    I copy-pasted your code and ran it. I got the...

    I copy-pasted your code and ran it. I got the result you were expecting and not the one you're getting. Which compiler are you using?
    EDIT: There is a library which you can include <math.h>. The...
  20. Replies
    12
    Views
    27,592

    Dont use feof...

    Dont use feof. It might be causing the problem.
  21. Replies
    12
    Views
    4,808

    I found a link where it has been discussed....

    I found a link where it has been discussed.
    bitwise on floats
  22. Replies
    3
    Views
    1,660

    LOL.:)

    LOL.:)
  23. Replies
    12
    Views
    4,808

    Floats are real numbers, they have a decimal...

    Floats are real numbers, they have a decimal point whereas ints are pure integers with no decimal point. '&' and '>>' are bitwise operators that require int, char, short or long as their arguments,...
  24. Replies
    14
    Views
    11,287

    The code is getting executed so fast that the...

    The code is getting executed so fast that the time is always coming out to be 0.000000.
  25. Replies
    93
    Views
    12,189

    According to me it goes like this. You can't...

    According to me it goes like this.
    You can't fulfill everyone's requirement, so there comes a term *majority* to whom I was addressing. I know that it was my fault not attaching it as a jpg file but...
Results 1 to 25 of 496
Page 1 of 20 1 2 3 4