The .bss segment stores all uninitialized global, static, and external variables (declared with extern keyword). Global, external, and static variable are by default initialized to zero. This section occupies no actual space in the object file. it is merely a … Continue reading
#include #include int main() { int r,c,k; printf(“enter the size of rows\n”); scanf(“%d”,&r); printf(“enter the size of columns\n”); scanf(“%d”,&c); int **a,**b,**d,i,j; a=(int **)malloc(sizeof(int*)*3); if(!a) { perror(“malloc”); goto x; } for(i=0;i<3;i++) *(a+i)=(int *)malloc(sizeof(int)*3); if(!(*(a+i))) { perror("malloc"); goto x; } b=(int **)malloc(sizeof(int*)*3); … Continue reading
#include<stdio.h> int main() { int a[5]; int i,j,loc,smallest,temp; printf(“enter array element”); for(i=0;i<5;i++) { scanf(“%d”,&a[i]); } for(j=0;j<5;j++) { smallest=a[j]; for(i=j+1;i<5;i++) { if(a[i]<smallest) { smallest=a[i]; loc=i; temp=a[j]; a[j]=a[loc]; a[loc]=temp; } } printf(“sorted array is[%d]=%d\n”,j,a[j]); } return 0; }