📄 main.c
字号:
#include <stdio.h>#include <stddef.h>#include <stdlib.h>#include <math.h>#include "lfsr.h"#define MATLAB 0int main(int argc, char **argv){ int n; int* S; /* Get command line parameter */ if (argc != 2) { fprintf(stderr,"main: inproper number of arguments, bye!\n"); exit(-1); } n = atoi(argv[1]); fprintf(stderr,"Iterate %d times\n",n); /* Initialize the array for the output */ S = (int *)malloc((size_t)((n*NB)*sizeof(int))); if (!S) { fprintf(stderr,"main: allocation failure, bye!\n"); exit(-1); } /* Call the LFSR */ lfsr(S,n); /* Send the result to standard output */ print_content(S,n); /* Clean up */ free(S); /* Done, say goodbye */ exit(0);}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -