예제 #1
0
파일: Memory.c 프로젝트: jmguill/my-service
char * newString(int size)
{
	char * string;

	string = (char *) malloc(size + 1);
	memset(string, 0, size + 1);
	if (!NULL) {
		insertLL(strings, string, sizeLL(strings) + 1);
	}
	showLL(strings);
	return string;
}
예제 #2
0
int main (int argc, char *argv){
	int values[] = {1,2,3,4,5,6,7,8,9,10};
	lnode *head = (lnode *) malloc(sizeof(lnode));
	makeLL(&head,values);
	printLL(&head);
	insertLL(&head,23,4);
	printf("after inserting	 \n");
	printLL(&head);
	deleteLL(&head,4);
	printf("after deleting \n");
	printLL(&head);
	return 0;
}