Month: May 2017
code: #include<stdio.h> typedef struct{ int age; char name[20]; double gp; }student; int main() { student s1; student…
code: #include<stdio.h> typedef int integer; //self declaration typedef struct Student student; struct Student{ int roll; char name[20];…
code: #include<stdio.h> struct Student{ int roll; char name[20]; double gp; }; int main() { struct Student s1,s2,s3;…
theortecical concept source: http://stackoverflow.com/questions/20347170/char-array-and-char-array code: char *array = “One good thing about music”; char array[] = {“One”,…
code: //dynamically 2d array #include<stdio.h> #include<stdlib.h> int **allocate(int nRows,int nCols) { int **p; p=(int**)malloc(nRows*sizeof(int*)); if(p==NULL) exit(0); int…
malloc() code: #include<stdio.h> #include<stdlib.h> int main() { int *p; int n; printf(“how many integers:”); scanf(“%d”,&n); p=(int*)malloc(n*sizeof(int)); if(p==NULL)…
Recent Comments