What do you want to save?
Add Code snippet
New code examples
-
C++ 2021-10-18 01:00:11
Max element in an array with the index in c++
int main(int argc, char** argv) { int A[4] = {0, 2, 3, 1}; const int N = sizeof(A) / sizeof(int); cout << "Index of max element: " << distance(A, max_element(A, A + N)) << endl; return 0; } Add solution -
C 2021-10-17 18:57:08
how to search in a file in c
#include <stdio.h> #include <string.h> #include <stdlib.h> int main(int argc, char const *argv[]) { int num =0; char word[2000]; char *string[50]; FILE *in_file = fopen("student.txt", "r"); //FILE *out_file = fopen(... Add solution -
C 2021-10-13 13:54:12
c producer consumer pthread semaphore
/* buffer.h */ typedef int buffer_item; #define BUFFER_SIZE 5 /* main.c */ #include <stdlib.h> #include <stdio.h> #include <pthread.h> #include <semaphore.h> #include "buffer.h" #define RAND_DIVISOR 100000000 #define T... Add solution -
C++ 2021-10-12 10:05:03
standard deviation function in c++
#include<iostream> #include<cmath> using namespace std; int main(int argc, char const *argv[]) { double mean; double nums[] = {9, 2, 5, 4, 12, 7, 8, 11, 9, 3, 7, 4, 12, 5, 4, 10, 9, 6, 9, 4}; double standardDeviation = 0; doubl... Add solution -
C 2021-10-10 19:11:04
struct main function c in unix
/* main.c */ int main(int argc, char *argv[]) { } Add solution -
C++ 2021-10-08 13:22:07
find number of 1s in a binary cv::mat image
#include <opencv2/core/core.hpp> #include <opencv2/imgproc/imgproc.hpp> #include <opencv2/highgui/highgui.hpp> #include <iostream> #include <features2d.hpp> using namespace cv; using namespace std; int main(int argc, char *ar... Add solution
Best helpers
Ranking is empty