diff --git a/Arrays/1D Array/solution.c b/Arrays/1D Array/solution.c new file mode 100644 index 0000000..1eca0ed --- /dev/null +++ b/Arrays/1D Array/solution.c @@ -0,0 +1,10 @@ +#include +void main() +{ + int N,i,A[100]; + scanf("%d",&N); + for(i=0;i +void main() +{ + int j,i,m,n,A[10][10],B[10][10]; + scanf("%d %d",&m,&n); + for(i=0;i +#include +struct Student +{ + int roll; + char name[25] +}; +void main() +{ + int q,i,r,N,N1,j; + char nam[25]; + scanf("%d",&N); + struct Student *ptr = (struct Student*) malloc (N * sizeof(struct Student)); + for(i=0;iroll,&(ptr+i)->name); + scanf("%d",&q); + for(i=0;iroll==N1) + { printf("%s\n",(ptr+j)->name); + break; + } + } + } +} \ No newline at end of file diff --git a/Stacks/Stacks/solution.c b/Stacks/Stacks/solution.c new file mode 100644 index 0000000..88eefcd --- /dev/null +++ b/Stacks/Stacks/solution.c @@ -0,0 +1,25 @@ +#include + +void main() +{ + int f,i,N,cus[100000],top=-1; + scanf("%d",&N); + for(i=0;i"${PROJ_PATH}/${OUTPUT_DIR}/op${op_n}.txt" + + cat "${PROJ_PATH}/${OUTPUT_DIR}/op${op_n}.txt" | shasum | cut -d ' ' -f 1 | + cmp -s -n 40 "${PROJ_PATH}/${PROBLEM}/${TESTCASE_DIR}/op${op_n}_hashed.txt" - && + echo "test case ${op_n} passed" || echo "test case ${op_n} failed" +done + +# cleanup +rm -r "${PROJ_PATH}/${OUTPUT_DIR}/" || + error_exit "directory operation failed"