Demo on Structures in C

The Structure is a special type of C data type. A structure contains a number of data types grouped together. Structure in C allows multiple data types to be grouped together.
The below mentioned program is to demonstrate structures in C Programming Language.

Output:

Also See:
Structures in C Programming Language

You may also like...

11 Responses

  1. Ankit says:

    oh woh i am very happy to see this site. as i wanted than i see in this. thanks for that person who created this site.

  2. Unknown says:

    why there is i+1 in the for loop??
    kindly tell me plz

  3. Manoj Rathod says:

    @ Unknown :-

    Bcoz if i+1 is not assigned it will ask in output :-

    Enter the age of animal 0

    Hope it helped 🙂

  4. Anonymous says:

    to clear understand

    #include
    void main()
    {
    int i;
    for(i=0;i<5;i++)
    {
    printf(“\a%d”,i+1);
    }
    return 0;
    }
    see what heppen, where \a for beep allert..
    becoz;
    i=0
    after a loop
    i++ as i=1
    again
    i++ as i=1+1 2
    again
    i++ as i=1+1+1 3
    again
    i++ as i=1+1+1+1 4
    and so on up to 5

  5. KIFA AKIFF says:

    what do you mean by “clrscr()”

  6. LearnCOnline says:

    clrscr() simply clears the output screen

  7. Anonymous says:

    @ KIFA AKIFF…we use clrscr(); to clear the screen so that there’s no scrolling in cmd console……but if the next step of program is lengthy then there will be scrollin again…….. my question is …..why you used conio.h instead of string.h…..what is its purpose…??

  8. Anonymous says:

    1 more thing to ask…u said to include array and used strings in the demo…..if i enter a name its ok….but when i enter full name…with spaces..it just skips to program stop…..string.h is not included….y

  1. March 1, 2014

    […] Also See: Program to demonstrate Structures in C Programming Language […]

Leave a Reply

Your email address will not be published. Required fields are marked *