This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void exceptionExample(){ | |
int *pi = NULL; | |
_try{ | |
pi = (int*)malloc(sizeof(int)); | |
*pi = 5; | |
printf("%d\n",*pi); | |
} | |
_finally{ | |
free(pi); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// C program for array implementation of stack | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <limits.h> | |
// A structure to represent a stack | |
struct Stack{ | |
int top; | |
unsigned capicity; | |
int *arry; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
int main() { | |
char *names[] = {"Miller", "Jones", "Anderson"}; | |
// printf("%c\n",*(names+1)); | |
printf("%c\n", *(*(names + 1) + 2)); | |
printf("%c\n", names[1][2]); | |
printf("%d\n",sizeof(int)); | |
printf("%d\n",sizeof(char)); | |
printf("%d\n", sizeof(names)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Created by Ya Nan on 2018/8/30. | |
// | |
/*-------------simple link list----------------*/ | |
struct Node{ | |
int data; | |
struct Node * next; | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Created by Ya Nan on 2018/8/30. | |
// | |
/*-------------simple link list----------------*/ | |
struct Node{ | |
int data; | |
struct Node * next; | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Created by Ya Nan on 2018/8/30. | |
// | |
/*-------------simple link list----------------*/ | |
struct Node{ | |
int data; | |
struct Node * next; | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Created by Ya Nan on 2018/8/30. | |
// | |
/*-------------simple link list----------------*/ | |
struct Node{ | |
int data; | |
struct Node * next; | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Created by Ya Nan on 2018/8/30. | |
// | |
/*-------------simple link list----------------*/ | |
struct Node{ | |
int data; | |
struct Node * next; | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Created by Ya Nan on 2018/8/28. | |
// | |
//归并排序 | |
void mergeSort(int data[], int first, int last); | |
void merge(int data[], int low, int mid, int high); | |
/*-------二分插入排序----------*/ | |
#include <stdio.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Created by Ya Nan on 2018/8/28. | |
// | |
//归并排序 | |
void mergeSort(int data[], int first, int last); | |
void merge(int data[], int low, int mid, int high); | |
/*-------二分插入排序----------*/ | |
#include <stdio.h> |
NewerOlder