What do you want to save?
Add Code snippet
New code examples
-
C 2021-09-09 02:12:03
circular linked list in c
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <stdbool.h> struct node { int data; int key; struct node *next; }; struct node *head = NULL; struct node *current = NULL; bool isEmpty() { return ... Add solution -
C 2021-09-09 00:28:02
implement stack using link list in c
#include <stdio.h> #include <stdlib.h> #define TRUE 1 #define FALSE 0 struct node { int data; struct node *next; }; typedef struct node node; node *top; void initialize() { top = NULL; } void push(int value) { node *tmp; ... Add solution -
TypeScript 2021-09-08 22:45:02
write a program to print all unique elements in an array
//write a program to print all unique elements in an array in c #include <stdio.h> int main(int argc, char const *argv[]) { int arr[] = {4, 256, 2, 256, 4, 3, 3, 5}, seen; int arr_length = sizeof(arr) / sizeof(int); for (int i = 0; i ... Add solution -
C 2021-09-07 18:11:01
how to find the ith row of pascal's triangle in c
#include <stdio.h> #include <stdlib.h> int main() { int N; scanf("%d", &N); int pascalArray[N + 1][N + 1]; int i, j; if(0 <= N && N <= 20) { for (i = 0; i < N + 1; i++) { for(j =... Add solution -
Shell/Bash 2021-09-06 19:22:03
how to get mcp23017 input in binary shell
# assuming chip is addressed to 0x20 # to setup sudo i2cset -y 1 0x20 0x00 0x00 # replace 1 with zero on rev1 pi # iodira is 0x00 and iodirb is 0x01 # setting all pins on gpa to input # echo as binary address GPIOA is 0x12 and GPIOB is 0... Add solution