Search:

Type: Posts; User: skyr6546

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. why getting wired result ...

    why getting wired result


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

    }a;
  2. 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';
  3. Replies
    10
    Views
    740

    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];
  4. Replies
    10
    Views
    740

    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];
  5. Replies
    10
    Views
    740

    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}
  6. Replies
    4
    Views
    472

    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;
    }
    ...
  7. Replies
    4
    Views
    472

    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;
  8. 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 ...
  9. 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 ?
  10. 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() {
  11. Replies
    7
    Views
    741

    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...
  12. Replies
    7
    Views
    741

    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
  13. Replies
    7
    Views
    741

    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...
  14. Replies
    7
    Views
    741

    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
  15. Replies
    3
    Views
    470

    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;
  16. Replies
    3
    Views
    470

    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;
  17. Replies
    5
    Views
    473

    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...
  18. Replies
    5
    Views
    473

    Size of structure

    I wrote code like this

    #include<stdio.h>#include<stdlib.h>
    struct Name{
    char n;
    char m;
    struct Name *N;
    };
    void main (){
    struct Name *H = (struct Name*)malloc(sizeof (struct Name));
  19. I did not understand your answer It would be even...

    I did not understand your answer It would be even better if you gave an example as I gave
  20. difference between declaration and definition of a variable?

    Hi everybody

    I am declaring and initializing variable n in my code. I do not understand what meaning of define the variable in c


    #include<stdio.h>void main()
    {
    int n //declar...
  21. Replies
    4
    Views
    743

    My question is for C language only ?

    My question is for C language only ?
  22. Replies
    4
    Views
    743

    What is qualifier in c

    this is not assignment and homework question

    My question is what do you understand term 'qualifier" in c language

    I am neither asking about const nor asking about volatile. I know both are...
  23. My mistake #include int...

    My mistake


    #include <stdio.h>
    int main(void)
    {
    const int x = 20;

    printf("x = %d \n", x);
  24. When we should really use constant and define

    code with define keyword

    #include <stdio.h>

    #define x 20


    int main(void)
    {
    printf("x = %d \n", x);
  25. Replies
    4
    Views
    562

    Hi Hodor I am still confuse. look at following...

    Hi Hodor

    I am still confuse. look at following code it will not compile it's just example of timer interrupt. assume interrupt generate at every 1 second


    #include<microcontroller.h>
    ...
Results 1 to 25 of 32
Page 1 of 2 1 2