Category: Array
code: #include<stdio.h> typedef union { double weight; int size; char color[10]; } Description; typedef struct { int…
code: #include<stdio.h> typedef struct { int roll; char name[20]; double gp; } sTudent; void inputStudent(sTudent *sp) {…
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…
code: #include<stdio.h> void toggleChar(char *sptr){ int i; for(i=0;*(sptr+i)!=’\0′;i++) { if(*(sptr+i)>=’a’ && *(sptr+i)<=’z’) *(sptr+i)=*(sptr+i)-32; else if(*(sptr+i)>=’A’&& sptr[i]<=’Z’) *(sptr+i)=*(sptr+i)+32;…
code: #include<stdio.h> void printArray(int *p_array,int n) { int i; printf(“Content of the array: “); for(i=0; i<n; i++)…
Recent Comments