My Blog
Articles related to programming, computer science, technology and research.

C program to demonstrate typedef usage with a structure

06/05/2016 Categories: Structures and Unions. Comments Off on C program to demonstrate typedef usage with a structure

  /* * C program to demonstrate typedef usage with a structure * Author: P.S.SuryaTeja */ #include <stdio.h> #include <conio.h> #include <math.h> #include <stdlib.h> #include <string.h> typedef struct { int id; char name[20]; }student; int main(int argc, char **argv) { student *stp; student st; stp = &st; printf(“Enter student id: “); scanf(“%d”, &stp->id); //&stp->id is […]

Read the rest of this entry »

C program to demonstrate accessing a structure using a pointer

06/05/2016 Categories: Structures and Unions. Comments Off on C program to demonstrate accessing a structure using a pointer

 

Input and output for the above program is as follows:

 

Read the rest of this entry »

C program to demonstrate union

06/05/2016 Categories: Structures and Unions. Comments Off on C program to demonstrate union

 

Input and output for the above program is as follows:

 

Read the rest of this entry »

C program to demonstrate structure

06/05/2016 Categories: Structures and Unions. Comments Off on C program to demonstrate structure

 

Input and output for the above program is as follows:

 

Read the rest of this entry »
Scroll Up