Search:

Type: Posts; User: skyr6546

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    1
    Views
    636

    trouble to understnad function in code

    Hello,
    I am trying to understand this program.

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

    struct node
    {
    int data;
    struct node *next;
  2. Replies
    1
    Views
    1,011

    Memory allocation at run time

    Can someone clarify what's memory allocation at run time ?

    When I need to write a program I write it on editor and save it. when i compile/run program. compiler allocate memory. if there is error...
  3. Why can't we have a two storage with a single variable

    I wrote code with two storage class with a single variable. test result show that we can't we have a two storage with a single variable. anyone can explain Why can't we have a two storage with a...
  4. I understand following declarations int...

    I understand following declarations


    int one_dim[4] ; // It can store 4 variables
    int two_dim[4][4] ; // It can store 16 variables
    int three_dim[2][3][4] ;// it can store 24 variables

    ...
  5. How does multidimensional array store variables

    I am having trouble to understand How does multidimensional array store variables

    No problem with 1D array

    int one_dim[] = { 1,2,3 };

    My understanding for 2D

    #define row 3
    #define...
  6. Replies
    1
    Views
    751

    how to dereference a void pointer

    A void pointer can hold address of any type

    if the pointer know the address of another variable, then we can change the value store in that address by pointer dereference

    In a code ptr hold...
  7. Replies
    4
    Views
    3,208

    41 = 416^1+116^0 = 64+1 = 65 = 'A' character...

    41 = 416^1+116^0 = 64+1 = 65 = 'A' character
    30 = 316^1+016^0 = 48 = '0' character

    How to convert this technique in c code
  8. Replies
    4
    Views
    3,208

    How to convert byte into ASCII

    Hello

    I am working on the project where I need to send ASCII numbers to to LCD

    any idea how to do convert it in main function


    void LCD (unsigned char *PTR )
    {
    //LCD code
  9. why getting wired result ...

    why getting wired result


    #include<stdio.h>union u
    {
    int x;
    char y;
    float z;

    }a;
  10. why the result of print statement for a.x isn''t 1?

    why the result of print statement for a.x isn''t 1?


    #include<stdio.h>

    union u{ int x; char y;}a;
    int main ()
    {
    a.x = 1;
    a.y = 'A';
  11. Replies
    10
    Views
    3,066

    I set index of second array to 0 ...

    I set index of second array to 0

    #include<stdio.h>
    int main ()
    {
    int i;

    int x[] = { 1, 2, 3, 4 };
    int y[] = { 3, 4, 5, 6, 7 };
    int z[9];
  12. Replies
    10
    Views
    3,066

    I don't understand what i'm doing wrong ...

    I don't understand what i'm doing wrong

    #include<stdio.h>
    int main ()
    {
    int i;

    int x[] = { 1, 2, 3, 4 };
    int y[] = { 3, 4, 5, 6, 7 };
    int z[9];
  13. Replies
    10
    Views
    3,066

    How to merge two array

    I want to merge the values of two arrays

    For example

    x = { 1, 2, 3, 4 }
    y = { 3, 4, 5, 6, 7 }
    z= {1, 2, 3, 4,3,4,5,6,7}
  14. Replies
    4
    Views
    2,644

    struct Node * Add_Node( int data, struct Node *p...

    struct Node * Add_Node( int data, struct Node *p ){

    struct Node *new = malloc(sizeof(*new));
    new-> value = data;
    new->next = p;
    printf("new : %p \n", new);
    return new;
    }
    ...
  15. Replies
    4
    Views
    2,644

    Printing address of structure pointer

    I have compiled my code codes but I do not understand what is happening from the output of the code



    #include<stdio.h>

    #include<stdlib.h>

    struct Node{
    int value;
  16. Replies
    2
    Views
    2,698

    Am I right about dynamic memory allocation

    Dynamic memory allocation means that memory can be allocated at run time.


    #include<stdio.h>

    struct product {
    int id; /* Part number */
    char * name; /* Part name ...
  17. it say dot will use to access structure member...

    it say dot will use to access structure member but there is no information why the dot will only use.

    Does structure variable point structure member to assign value ?
  18. Why need a dot between structure variable and structure member ?

    Why need a dot between structure variable and structure member ?


    #include<stdio.h>

    struct Point {
    int x, y;
    };

    int main() {
  19. Replies
    7
    Views
    5,771

    Output of program address of p : 00000000...

    Output of program

    address of p : 00000000
    address of p : 007113A8
    address of p->x : 007113A8
    value of p->x : A
    value of p->x : B
    address of p : 007113A8
    address of p->x : 007113A8
    address...
  20. Replies
    7
    Views
    5,771

    I didn't understand p->x = 8; I understand...

    I didn't understand

    p->x = 8;

    I understand p is pointer and it pointing to the object x of structure. p hold the memory location of x and value stored in x is 8
  21. Replies
    7
    Views
    5,771

    my another doubts p->x is initialized to 8...

    my another doubts

    p->x is initialized to 8 or only x is initialized to 8



    p->x ; // p is a pointer to an object of struct point. it point to the object of structure x but p->x is...
  22. Replies
    7
    Views
    5,771

    pointer to structure in c

    I have written code to understand pointer to structure


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


    struct point //define structure
    {
    int x; //structure member type integer
  23. Replies
    3
    Views
    2,751

    I was just trying to acess the array (structure...

    I was just trying to acess the array (structure member)

    Am I really following good example ?


    #include<stdio.h>
    struct s
    {
    int A[10]; //structure member
    }v;
  24. Replies
    3
    Views
    2,751

    How to access a array in a struct?

    I have written code to access array element in structure

    #include<stdio.h>

    struct s
    {
    int A[10]; //structure member
    }v;
  25. Replies
    5
    Views
    4,600

    Structure size = (H->n) + (H->m) + (H->N) ...

    Structure size = (H->n) + (H->m) + (H->N)
    = 1 + 1 + 4
    = 6

    But compiler showing size is 8 bytes

    Am I wrong in my calculation? I do not understand why it show two extra...
Results 1 to 25 of 40
Page 1 of 2 1 2