What do you want to save?
Add Code snippet
New code examples
-
Other 2021-09-30 06:18:05
binary search tree
// Binary Search Tree operations in C #include <stdio.h> #include <stdlib.h> struct node { int key; struct node *left, *right; }; // Create a node struct node *newNode(int item) { struct node *temp = (struct node *)malloc(sizeof(struc... Add solution -
C 2021-09-30 04:14:03
Write an Algorithm to reverse a string without using any built-in function.
#include <stdio.h> int main() { char str[100], temp; int i, j = -1; // Take string input from user. printf("Enter string"); gets(str); i = 0; // count the length of a input ... Add solution -
C 2021-09-29 07:21:03
c program to arrange numbers in descending order
/* C program to arrange numbers in descending order DescOrder.C */ #include <stdio.h> void main () { //variable declaration int number[30]; int i, j, a, n; //asking user to enter size of array printf("Enter the value of N\n"); s... Add solution -
C 2021-09-29 07:15:02
recursive function to find the sum of the nth term using c
#include <stdio.h> int addNumbers(int n); int main() { int num; printf("Enter a positive integer: "); scanf("%d", &num); printf("Sum = %d", addNumbers(num)); return 0; } int addNumbers(int n) { ... Add solution -
C++ 2021-09-28 18:23:04
how to make rng in c++
#include <stdio.h> #include <stdlib.h> #include <ctime> int main() { srand((unsigned) time(0)); printf("Your dice has been rolled! You got: \n "); int result = 1 + (rand() % 6); printf("%d \n", result);... Add solution