Home Discussion Discuss: C Structure example

  • Isn't it Strange?Shiben June 3, 2011 at 12:11 PM

    #include<stdio.h> struct student{ int a; char b[45]; }; void main() { struct student student1; printf("Size of struct: %d" ,sizeof(student1)); } The output in c99 :Size of struct :52 Why is that ?

  • CommentdE_logics June 9, 2011 at 8:12 PM

    Sheer stupidity. #include <conio.h> and getch(); It proves you know nothing but Windows.

  • C Structuresviky August 30, 2011 at 11:41 AM

    struct student st; what is the use of the above statement in the code

  • strectureKapil Shishodia September 10, 2011 at 9:00 AM

    good example ............. i want more example based on strecture.

  • c programmingmanish kumar September 13, 2011 at 8:31 PM

    structure and union........../ pointer in c

  • c Structure examplePiet October 3, 2011 at 6:05 AM

    I cannot run the example, because the compilers does not know #include <conio.h> What can I do? thx

  • C vinay October 6, 2011 at 2:15 PM

    I want to how to pass structure variable to function in simple way.

  • queriy related typedef stuct.mukul kshatriya October 19, 2011 at 6:36 PM

    can u tell me how to create a typedef of a employee of a company having a attribute Name,Emp_ID,Dept Name,Designation.. same as for student of a collage with the attributes Name,Rollno,Section,Branch,Total amrks,Result.. do reply as soon as it is possible..

  • HImohamed rizwan December 15, 2011 at 12:37 PM

    Its nice to see many tags for structure i hope this tags may use us in coding our new idea

  • Stack by pointermadhusudan balai December 21, 2011 at 8:49 PM

    #include <stdio.h> #include <stdlib.h> int MAX; int count = 0; struct node { struct node *next; int value; }; void push (struct node ** headref,int k) { if( count < MAX ) { struct node *newnode; newnode = malloc(sizeof(struct node)); newnode->value = k; newnode->next = *headref; *headref = newnode; count++; } else { printf(" Stack is Full "); } } void pop(struct node * headref) { int m; if (headref == NULL) { printf(" STACK IS EMPTY "); exit(0); } else { m = headref->value; printf(" POP OUT VALUE %d" ,m); } } int main() { struct node *head = NULL; int val, choice, i,j = 1; printf(" enter the MAXIMUM size for stack\n "); scanf(" %d " ,&MAX); while(j) { printf(" ENTER THE CASE NUMBER WHICH U WANT TO CHOOSE \n\t 1.FOR PUSH \n\t2.FOR POP\n "); scanf(" %d ",&choice); switch(choice) { case 1: printf("enter the value to be pushed "); scanf("%d",&val); push(&head,val); break; case 2: pop(head); head = head->next; break; default: printf(" invalid option\n "); } printf(" enter the one for continue\n "); scanf("%d",&j); } return 0; }

  • learn c structure hanumant January 21, 2012 at 1:57 PM

    i become perfert in to the structure in c

  • cv.elango January 25, 2012 at 9:24 AM

    palindrome

  • data structure Amit Godsay February 3, 2012 at 5:36 PM

    why linked list is useful than array and send the program of linked list

  • a doubtjafar sadiq e February 12, 2012 at 6:01 PM

    struct student st; in this, what "st" stands for..????

  • Thanks a lot :DRicachan February 16, 2012 at 9:33 AM

    Thanks man! that was simple and very helpful.

  • csundar February 29, 2012 at 12:39 AM

    fill detail about c..

  • c programbenjamin ansong May 11, 2012 at 7:02 PM

    how to use functions in c structures.

  • doubt in structures in csuresh May 15, 2012 at 2:49 PM

    how can i access structure elemnts with out using dot and arrow aoperators

  • C,C++Mohammed Imtiyaz M June 5, 2012 at 11:18 AM

    struct student st; Can any one please explain above statement in detail.

  • ask questionsweta agrawal July 10, 2012 at 11:55 AM

    please quickly give the answer of the ques.

  • c programssuresh March 9, 2013 at 8:05 AM

    how to solve in oops consept problems

  • Cpankaj July 17, 2012 at 10:27 AM

    good explanation

  • structureskrishnakumari August 1, 2012 at 8:00 AM

    very nice

  • help to understand plzshuham September 18, 2012 at 1:59 PM

    struct stud { int roll ; char name[10]; struct stud *next; } what that line means 'struct stud *next'

  • c-structuresDIVYA October 3, 2012 at 4:01 PM

    want programme for cheak validation of date

  • c quizMangesh October 19, 2012 at 4:15 PM

    what is the use of getch in c

  • c progaramabhinaya November 11, 2012 at 11:51 AM

    this is good

  • NO So Badlapta November 22, 2012 at 10:56 AM

    Good Attempts

  • structure in c rahul sharma November 24, 2012 at 12:27 AM

    when some one ask for the simplest example of ...kindly do'nt use the pointer .... difne the sturct example ..in a very simple way so that begners cn understand it easily .............

  • structurerinku sehrawat April 18, 2013 at 10:28 AM

    w.a.p for structure record of a student

Post your Comment



Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Related Articles
Development process Questions

structure example
structure example  in the example above what do you call the names student1,student2 and student3   Post the code 

Java Beginners

cylinder tree structure
materials in a hierarchical structure in a cylinder form. for example my interface... code to create the tree structure. your advice will be very very appreciated 

SQL Question

mysqldump structure only
mysqldump structure only  Hi, How to take dump of database structure only? Provide me the syntax to take mysqldump structure only. Thanks   Hi, You can use -d option with mysqldump command to take the structure only 

C Tutorials

C Structure Pointer
C Structure Pointer       This section illustrates you the concept of Structure Pointer in C. You can see in the given example, we want to access the employee's information 

GWT

Creating Tree Structure using GWT
Creating Tree Structure using GWT       This example describes the Basics for building the Tree Structure using GWT. The steps involved in Building the Tree Structure 

Programming Tutorials

PHP Alternative Control Structure
Alternative Control Structure: PHP provides alternative ways to use control... structure we can replace the opening brace with a colon(:) and the closing brace... coding within any control structure, the examples are given below: elseif 

C Tutorials

C Structure example
C Structure example       This section illustrates you the concept of structure in C. Structures... by the structure type name. In the given example, a small structure i.e struct is created 

Java Beginners

which data structure is good in java..? - Java Beginners
which data structure is good in java..?  Hi frends, Actually i want to store and retrieve some data using data structures like array list, stack... anyone give me good example how that best technique i can use in my programs 

Travel

Basic Structure of Taj Mahal India
Basic Knowledge about the Structure of Taj Mahal Everyone who has love for this monument must want the basic knowledge about the structure of Taj Mahal. The Taj Mahal is the well-designed example of the art of Mughal architecture 

Programming Tutorials

Pointer and Structure in C
Description: In this tutorial you will see how pointer is used with structure. This is a very important example because all data-structure program work... as p->roll like used in example. Output: Download this code 

Programming Tutorials

Linear and Non-Linear Data Structure in C
as its previous and next member. Example of Linear Data Structure Array... element then it is known as non-linear data structure. Example of Linear Data...Linear Data Structure: Linear data structure is linear if element is adjacent 

JSP Servlet Questions

structure in JSP
structure in JSP  How do I achieve structure in JAVA or JSp 

Struts Questions

Array of structure
Array of structure  create employment details with necessary field using array of structure 

Java Beginners

Is there a data structure like a class that doesn't need to be defined as a class in it's own file?
Is there a data structure like a class that doesn't need to be defined... ArrayLists easier. For example, I want to create the class Equipment which... another charge. However, I recall once seeing a data structure that one could create 

Java Beginners

Data structure
Data structure: How to sort numbers in a queue using a bubble sort method?  How to sort numbers in a queue using a bubble sort method 

Java Beginners

C Structure
C Structure  Respected sir, Can a structure in C contain a pointer to itself ? if yes means how sir ? plz help me sir 

JSP Servlet Questions

inbox structure
inbox structure  I want to create an inbox for my project in which records are to be fetched dynamically. I am using netbeans (jsp + javascript+ servlet.) The structure is same like yahoo inbox (1st column full of check boxes 

JSP Servlet Questions

INBOX STRUCTURE
 

Java Tips and Examples

Presentation-Model Structure
Java NotesPresentation-Model Structure Previous - Big Blob, Next - MVC The single most important structure in a program is to separate the user... and maintenance are much simpler with this structure. A further separation can 

HTML Questions

tables to structure forms
tables to structure forms  How can I use tables to structure forms 

HTML Questions

tables to structure forms
tables to structure forms  How can I use tables to structure forms 

HTML Questions

use tables to structure forms
use tables to structure forms  How can I use tables to structure forms 

HTML Questions

use tables to structure forms
use tables to structure forms  How can I use tables to structure forms 

Java Tips and Examples

Big Blob Structure
Java Notes Big Blob Structure A common style of programming is to put... the example code it will show you nice SWING GUI. It will give you a button... is in one file. Don't use this structure except for the absolutely simplest 

General

Retrieving JTree structure from database
Retrieving JTree structure from database       This example shows how to retrieving data from the database and how to add the data in to JTree. JTree : JTree is used 

Java Tips and Examples

Collections (Data Structure Library)
Collections (Data Structure Library) Predefined Libraries Standard data-structure solutions. Similar to C++ Standard Template Library. Don't...) has generics, similar to C++ templates. Non-standard 

Java Beginners

In data structure in java how to parse the given string and counts the member of character that match the given data?
the STACK or QUEUE Example output ** GIVEN STRING: a b c d e f g INPUT STRING: a c d e f No.of matches: five would you like to check other string? yes...In data structure in java how to parse the given string and counts the member 

Ajax Questions

Mlm tree structure
Mlm tree structure  i want mlm tree structure code in php with jquery or Ajax 

PHP Questions

MLM tree structure
MLM tree structure  i want mlm tree structure code in php .Please help me..... thanks in advance 

Ajax Questions

Mlm tree structure
Mlm tree structure  i want mlm tree structure code in php with jquery or Ajax 

DMCA.com