Search:

Type: Posts; User: Prateek Sarkar

Search: Search took 0.00 seconds.

  1. Replies
    11
    Views
    1,125

    Thanks a lot everyone. :)

    Thanks a lot everyone. :)
  2. Replies
    11
    Views
    1,125

    Why exactly do we need double pointers as...

    Why exactly do we need double pointers as arguments here? Can't the same be achieved without it? Eg. instead of what you suggested,

    node * head = &ptr;
    head== ptr;

    works the same way, or...
  3. Replies
    11
    Views
    1,125

    What does a *node_name hold? Since a node is a...

    What does a *node_name hold? Since a node is a structure of multiple data types, what does *node_name fetch? I know int *c, *c would fetch the integer stored at address pointed to by c.
  4. Replies
    4
    Views
    833

    Thank YOU. :)

    Thank YOU. :)
  5. Replies
    11
    Views
    1,125

    Linked List problem

    Here is a basic program for insertion at the beginning of a LL.


    void insert( node **head, int item)
    {
    node *ptr;
    ptr=(node *) malloc(sizeof(node));
    ptr->info= item;
    if( *head == NULL)...
  6. Replies
    4
    Views
    833

    size_t here is an user-defined return type I...

    size_t here is an user-defined return type I believe. How do we implement it? Can you help me with an example? Thanks.
  7. Replies
    4
    Views
    833

    Basic Pointer Problem

    How can we assign a pointer to a function? const char* function_name(), here what exactly does the pointer point to?

    Thanks.
  8. Replies
    2
    Views
    724

    Oh my. I missed that completely. Thanks a lot.

    Oh my. I missed that completely. Thanks a lot.
  9. Replies
    2
    Views
    724

    Simple String question

    Why do we not pass the address of the string during printf or scanf functions like we do for Integer or float variable types?

    Thanks in advance.
  10. Replies
    8
    Views
    1,887

    Thanks a lot :)

    Thanks a lot :)
  11. Replies
    8
    Views
    1,887

    Thanks have got a pretty good picture of what you...

    Thanks have got a pretty good picture of what you have explained so far. But what I still don't get is why do you say j is pointing to an 'ARRAY' of characters? j= (char*)&a typecasts the pointer to...
  12. Replies
    8
    Views
    1,887

    Can you kindly elaborate a little? As to how...

    Can you kindly elaborate a little? As to how exactly does this happen?




    What if I had used %c instead?
  13. Replies
    8
    Views
    1,887

    I am clear with the first part. But correct me...

    I am clear with the first part. But correct me please, the *j points to the starting address of the array which holds a floating value 3.14. Why does it print the ASCII value?
    Eg. int *p, a = 10; ...
  14. Replies
    8
    Views
    1,887

    Basic Pointer Problem

    #include<stdio.h> int main() { float a=3.14; char *j; j = (char*)&a; printf("%d\n", *j); return 0; }
    Forgive my ignorance, but what is the significance of the statement
    j=...
  15. Okay my doubts are cleared for now. Thanks a lot...

    Okay my doubts are cleared for now. Thanks a lot C99 :)
  16. Yeah, I wrote down the wrong for loop. Sorry. ...

    Yeah, I wrote down the wrong for loop. Sorry.

    So, for the above piece of code, the condition ( s[i] != c) compares the numeric value corresponding to the character at s[i] to the integer value c....
  17. I don't get by what you mean by ' not allowed to...

    I don't get by what you mean by ' not allowed to change its contents'. *arr can be used to assign to another string right since neither the pointer nor the string has been declared as a constant....
  18. Here is a piece of code which am struggling to...

    Here is a piece of code which am struggling to comprehend,


    void squeeze ( char s[], int c)
    {
    int i, j;
    for ( i=0; j=0; s[i] != '\0'; i++)
    if (s[i] != c)
    s[j++]...
  19. So when I use an array of pointers, the *arr...

    So when I use an array of pointers, the *arr points to the string( no numeric values and the string is stored as it is in memory) whereas when I don't use it the numeric value of 'S' gets stored in...
  20. How does a string get allocated in memory?

    Hello,

    I am confused as to how a character array gets stored. Eg. char arr = "string", how does it get stored in memory?

    Also, what if I intend to perform some arithmetic operations on a...
Results 1 to 20 of 20