C++ Codes
Algorithms
Algorithm Analysis in C++
Beginners
Code Snippets
Graphics
Data Structures
File Manipulation
Games
Mathematics
Miscellaneous
Visual C++ Library
C++ > Algorithms sample source codes
Structure
Structure #include
#include
#include
#include
typedef struct { char name[6]; int roll; }student; void main() { student *p; int n,i,temp; FILE *k; k=fopen("k.txt","w"); printf("enter the numbe of students "); scanf("%d",&n); p=(student *)malloc(n*sizeof(student)); for(i=0;i
name); printf("enter the roll number of student %d ",i+1); scanf("%d",&(p+i)->roll); } for(i=0;i
name); printf("\n roll number of student %d is %d",i+1,(p+i)->roll); } getch(); fclose(k); }
Privacy Policy
|
Link to Us
|
Links