1,
#include <stdio.h>voidSumint*2) { inti,sum=0; for(i=0;i<Ten; i++) {sum=sum+*p+i; } printf ("The elements in the array are:%d\n", sum);}intMain () {inta[Ten]={1,3,5,7,9,2,4,6,8,Ten}; int*p=A; SUM (p); return 0;}
2,
#include <stdio.h>#include<string.h>#include<stdlib.h>intMain () {intI=0, J; Char*p[5]; Charstr[ -]; Char*temp; while(str[0]!='#') {scanf ("%s", str); P[i]=(Char*) malloc (sizeof(Char)*strlen (str)); strcpy (P[I],STR); I++; } for(j=0;j<5; j + +) { for(i=1;i<5; i++) { if(strcmp (p[i],p[i-1]) <0) {Temp=P[i]; P[i]=p[i-1]; P[i-1]=temp; } } } for(j=0; j<i;j++) printf ("%s", P[j]); return 0; }
3,
#include <stdio.h>#include<stdlib.h>intMain () {int*p= (int*) malloc (Ten*sizeof(int)); inti; for(i=0;i<Ten; i++) scanf ("%d",&P[i]); for(i=0;i<Ten; i++) printf ("%d", P[i]); Free (p); return 0;}
4,
#include <stdio.h>intMain () {inta[Ten][Ten]; int*p[Ten]; inti,j; for(i=0;i<Ten; i++) {P[i]=A[i]; } for(i=0;i<Ten; i++) for(j=0;j<Ten; j + +) {A[i][j]= (i+1) * (j+1); } for(i=0;i<Ten; i++) { for(j=0;j<Ten; j + +) printf ("%d", P[i][j]); printf ("\ n"); } return 0;}
Feel learned the pointer this part of the content of some difficult, a lot of things do not understand, there is a part of the need to learn, because the last time because of sick leave, a part of the content did not listen to the process of their own learning also received a great obstacle, the job is through their own on-line access to information and seek help from classmates, There are still a lot of people do not understand the place, I will work hard!!!
C Language 11th time assignment