Search:

Type: Posts; User: Rahul11

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Replies
    10
    Views
    429

    Thanks to all for showing different approach ...

    Thanks to all for showing different approach



    we assume that first number in the array is smallest number. That's why we are not comparing. It's not good idea to compare same number in twice
    ...
  2. Replies
    10
    Views
    429

    smallest number in given sequence

    I am trying to find smallest number for every given sequence

    Here is program I wrote but it is not showing me the as I want

    I am stuck with function


    #include <stdio.h>

    void...
  3. Replies
    5
    Views
    283

    I am surprised because I am accessing a variable...

    I am surprised because I am accessing a variable x that is declared in another source file file1.c without extern

    main.c


    #include <stdio.h>
    #include "file1.h"

    int main() {
    x = 6;
  4. Replies
    5
    Views
    283

    I have declared variable x in main.c file. I want...

    I have declared variable x in main.c file. I want to access this variable in another file FileA.c. That's why i used extern storage class


    #include <stdio.h>
    extern int x;

    int main...
  5. Replies
    5
    Views
    283

    Program show result without extern

    I am wondering how program is showing correct output without external storage external class in source files because I have two source file

    main.c

    #include <stdio.h>
    void fun ();
    ...
  6. Replies
    1
    Views
    256

    Does code result match with diagram

    I wrote code for linked list and drawn diagram for list to show behavior. I just want to verify that description shown in picture match with code. Does it really match ?


    ...
  7. Replies
    5
    Views
    424

    Revised code #include #include...

    Revised code


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

    struct Node {
    int data;
    struct Node *next;
    };
  8. Replies
    5
    Views
    424

    I know what is double pointer but I don't...

    I know what is double pointer but I don't understand how double used in linked list


    In this example I have pointer P that point to first member of list. All the memory location are temporary

    ...
  9. Replies
    5
    Views
    424

    double pointer in LinkedList

    I've seen many example of linked list in which double pointer is used in a function to add the node in list





    void addNodetoList(struct Node **node, int x)
    {
    //additional code //
    }
  10. Replies
    2
    Views
    381

    size of structure

    one int variable occupy 4 byte and one char variable occupy 1 byte. In my code I store one int and char variable using structure


    #include <stdio.h>

    struct S
    {
    int x;
    char y;
    }s1;
  11. Replies
    2
    Views
    484

    Really I made silly mistake I didn't notice this...

    Really I made silly mistake I didn't notice this is happening because of the format specifier
  12. Replies
    2
    Views
    484

    printing define value

    I have written three programs first two program are working as it supposed to do but i don't understand what's happening in last program

    Program 1


    #include<stdio.h>


    #define value 'A'
  13. Replies
    9
    Views
    981

    List content 1 2 3 #include ...

    List content
    1
    2
    3



    #include <stdio.h>
    #include <stdlib.h>
  14. Replies
    9
    Views
    981

    I completely understand pointer, dynamic memory...

    I completely understand pointer, dynamic memory allocation and structure. I am only having trouble to pass pointer to structure in function, to return pointer in function, to pass double pointer to...
  15. Replies
    9
    Views
    981

    The idea was to test the code that pass...

    The idea was to test the code that pass dynamically allocated double pointer to structure type struct to function

    so far I wrote and tested code that pass pass dynamically allocated pointer to...
  16. Replies
    9
    Views
    981

    Passing double pointer to structure

    I found below function on this page Linked List | Set 2 (Inserting a node) - GeeksforGeeks I don't how its working

    double pointer of structure being passed to this function


    /* Given a...
  17. I want to modify the value of structure member...

    I want to modify the value of structure member without modifying actual address. I have written function but It doesn't works as expected


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

    typedef...
  18. #include#include typedef...

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


    typedef struct{

    int var1;
    int var2;

    } svar;
  19. Where does structure variable store and what does it store

    I am trying to figure out Where does structure variable store and what does it store using printf statement

    I have written this code


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


    typedef struct{
  20. Replies
    6
    Views
    812

    Thank you laserlight for answering my question

    Thank you laserlight for answering my question
  21. Replies
    6
    Views
    812

    Yes compiler shows following error error:...

    Yes compiler shows following error


    error: expected ':' before '{' token {
    ^




    I know default is use with switch case but this question is for my curiosity
  22. Replies
    6
    Views
    812

    can we use default keyword without switch

    I am curious to know can we use default keyword without switch ? If it can't be done. so can anyone tell why it can't be done.

    If it's possible to do so what's the problem in my code it shows...
  23. Thank you rstanley. Next time I would use better...

    Thank you rstanley. Next time I would use better name for variable
  24. I want to store value from 0 to 4 in memory...

    I want to store value from 0 to 4 in memory allocated by malloc function

    store value 0 at memory location 1
    store value 1 at memory location 2
    store value 2 at memory location 3
    store value 3...
  25. Value is not being stored at correct location

    I am trying to allocate dynamic memory for five integer to store value from 0 to 4
    as shown

    00DE2AB4 = 0
    00DE2AB8 = 1
    00DE2ABC = 2
    00DE2AC0 = 3
    00DE2AC4 = 4
Results 1 to 25 of 61
Page 1 of 3 1 2 3