repo
stringlengths
4
140
commit_id
stringlengths
7
7
rel_path
stringlengths
1
3.5k
language
stringclasses
37 values
url
stringlengths
37
3.56k
raw_url
stringlengths
54
3.58k
key
stringlengths
20
3.54k
ok
bool
1 class
status
int64
200
200
bytes
int64
48
425k
content
stringlengths
40
425k
worker_id
int64
0
7
Akesamuel/alx-low_level_programming
b3700a0
0x01-variables_if_else_while/100-print_comb3.c
C
www.github.com/Akesamuel/alx-low_level_programming/tree/main/0x01-variables_if_else_while/100-print_comb3.c
https://raw.githubusercontent.com/Akesamuel/alx-low_level_programming/b3700a0/0x01-variables_if_else_while/100-print_comb3.c
Akesamuel/alx-low_level_programming b3700a0 0x01-variables_if_else_while/100-print_comb3.c
true
200
380
#include <stdio.h> /** * main - print single digit numbers starting from 0 * * Return: returns zero at the end */ int main(void) { int i, j; for (i = 0; i <= 9; i++) { for (j = 1; j <= 9; j++) { if (j > i) { putchar(i + '0'); putchar(j + '0'); if (i != 8) { putchar(','); putc...
7
nuked44/Advent_of_code_in_C
707ca51
src/2015/2015_03.c
C
www.github.com/nuked44/Advent_of_code_in_C/tree/main/src/2015/2015_03.c
https://raw.githubusercontent.com/nuked44/Advent_of_code_in_C/707ca51/src/2015/2015_03.c
nuked44/Advent_of_code_in_C 707ca51 src/2015/2015_03.c
true
200
2,589
#include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <string.h> typedef struct { int x; int y; } position; bool is_uniqe(position *uniqe, position pos, size_t uniqe_added) { for (size_t i = 0; i < uniqe_added + 1; i++) { if ((uniqe[i].x == pos.x) && (uniqe[i].y == pos.y)) ...
2
eclipse-oniro-mirrors/security_crypto_framework
b655f7d
frameworks/certificate/x509_crl.c
C
www.github.com/eclipse-oniro-mirrors/security_crypto_framework/tree/main/frameworks/certificate/x509_crl.c
https://raw.githubusercontent.com/eclipse-oniro-mirrors/security_crypto_framework/b655f7d/frameworks/certificate/x509_crl.c
eclipse-oniro-mirrors/security_crypto_framework b655f7d frameworks/certificate/x509_crl.c
true
200
11,603
/* * Copyright (C) 2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
0
hasti2c/csc369
6ee25b6
a3/src/pagetable.c
C
www.github.com/hasti2c/csc369/tree/main/a3/src/pagetable.c
https://raw.githubusercontent.com/hasti2c/csc369/6ee25b6/a3/src/pagetable.c
hasti2c/csc369 6ee25b6 a3/src/pagetable.c
true
200
8,764
/* * This code is provided solely for the personal and private use of students * taking the CSC369H course at the University of Toronto. Copying for purposes * other than this use is expressly prohibited. All forms of distribution of * this code, including but not limited to public repositories on GitHub, * GitLab...
6
nyxtom/c-experiments
04888cf
kqueuetimer/main.c
C
www.github.com/nyxtom/c-experiments/tree/main/kqueuetimer/main.c
https://raw.githubusercontent.com/nyxtom/c-experiments/04888cf/kqueuetimer/main.c
nyxtom/c-experiments 04888cf kqueuetimer/main.c
true
200
905
#include <assert.h> #include <stdio.h> #include <unistd.h> #include <sys/types.h> #include <sys/event.h> int kq; struct context { void (*handler)(struct context *obj); }; void timer_handler(struct context *obj) { static int n; printf("Received timer event via kqueue: %d\n", n++); } int main() { kq =...
5
victorhtl/RTOS_PIC_OSA
059f85d
osa/apps/07_PROJETO_PAUSE_CONTINUE_THREAD/main.c
C
www.github.com/victorhtl/RTOS_PIC_OSA/tree/main/osa/apps/07_PROJETO_PAUSE_CONTINUE_THREAD/main.c
https://raw.githubusercontent.com/victorhtl/RTOS_PIC_OSA/059f85d/osa/apps/07_PROJETO_PAUSE_CONTINUE_THREAD/main.c
victorhtl/RTOS_PIC_OSA 059f85d osa/apps/07_PROJETO_PAUSE_CONTINUE_THREAD/main.c
true
200
4,088
#include <osa.h> #include "main.h" #include "bsp.h" #include "timer.h" #include "lcd.h" #include "button.h" void INTERRUPT_HIGH() iv 0x0008 ics ICS_AUTO { OS_EnterInt(); if (TMR2IF_bit){ TMR2IF_bit = 0; OS_Timer(); } OS_LeaveInt(); } OST_TASK_POINTER tp1; void main (void) { Init...
4
NurSyahnaPuterii/Praktikum5
9b9471a
PRAK501-2210817120007-NursyahnaPuteri.c
C
www.github.com/NurSyahnaPuterii/Praktikum5/tree/main/PRAK501-2210817120007-NursyahnaPuteri.c
https://raw.githubusercontent.com/NurSyahnaPuterii/Praktikum5/9b9471a/PRAK501-2210817120007-NursyahnaPuteri.c
NurSyahnaPuterii/Praktikum5 9b9471a PRAK501-2210817120007-NursyahnaPuteri.c
true
200
426
#include <stdio.h> int MaxBilangan (int a, int b, int c, int d) { if (a > b && a > c && a > d) return a; else if (b > a && b > c && b > d) return b; else if (c > a && c > b && c > d) return c; else return d; } int main () { int a, b, c, d; scanf ("%d %d %d %d", ...
7
adhamo0o/simple_shell
5ead35a
str.c
C
www.github.com/adhamo0o/simple_shell/tree/main/str.c
https://raw.githubusercontent.com/adhamo0o/simple_shell/5ead35a/str.c
adhamo0o/simple_shell 5ead35a str.c
true
200
1,130
#include "shell.h" /** * strcpy_fun - copy string * @dest: destination * @src: source * * Return: ptr */ char *strcpy_fun(char *dest, char *src) { int i = 0; if (dest == src || src == 0) return (dest); while (src[i]) { dest[i] = src[i]; i++; } dest[i] = 0; return (dest); } /** * strdup_fun - dupl...
2
msamy250/alx-low_level_programming
b80cb22
0x18-dynamic_libraries/0-strcat.c
C
www.github.com/msamy250/alx-low_level_programming/tree/main/0x18-dynamic_libraries/0-strcat.c
https://raw.githubusercontent.com/msamy250/alx-low_level_programming/b80cb22/0x18-dynamic_libraries/0-strcat.c
msamy250/alx-low_level_programming b80cb22 0x18-dynamic_libraries/0-strcat.c
true
200
499
#include "main.h" /** **_strcat -function that concatenates two strings. *@dest: Pointer to the destination buffer where the result will be stored. *@src: Pointer to the source string that will be appended to dest. *Return: a pointer to the resulting string dest */ char *_strcat(char *dest, char *src) { int i =...
0
DacNguyen99/LAB5-VXL
671f438
STM32Project/Core/Inc/timer.h
C
www.github.com/DacNguyen99/LAB5-VXL/tree/main/STM32Project/Core/Inc/timer.h
https://raw.githubusercontent.com/DacNguyen99/LAB5-VXL/671f438/STM32Project/Core/Inc/timer.h
DacNguyen99/LAB5-VXL 671f438 STM32Project/Core/Inc/timer.h
true
200
320
#ifndef INC_TIMER_H_ #define INC_TIMER_H_ void setTimer0 (int duration ) ; void setTimer1 (int duration ) ; void timer_run () ; //void HAL_TIM_PeriodElapsedCallback ( TIM_HandleTypeDef * htim ) ; int timer0_counter ; int timer0_flag ; int TIMER_CYCLE ; int timer1_counter ; int timer1_flag ; #endif /* INC_TIMER_H_ */
6
MwendeHarriet/alx-low_level_programming
80267a1
0x10-variadic_functions/1-print_numbers.c
C
www.github.com/MwendeHarriet/alx-low_level_programming/tree/main/0x10-variadic_functions/1-print_numbers.c
https://raw.githubusercontent.com/MwendeHarriet/alx-low_level_programming/80267a1/0x10-variadic_functions/1-print_numbers.c
MwendeHarriet/alx-low_level_programming 80267a1 0x10-variadic_functions/1-print_numbers.c
true
200
578
#include <stdio.h> #include <stdarg.h> #include "variadic_functions.h" /** *print_numbers -prints numbers followed by \n *description -prints numbers followed by \n *@separator: string between numbers *@n: integres passed to function *@...: parameters *Return: nothing */ void print_numbers(const char *separator, cons...
5
RedaMjibel/alx-low_level_programming
fcb8bc3
0x17-doubly_linked_lists/1-dlistint_len.c
C
www.github.com/RedaMjibel/alx-low_level_programming/tree/main/0x17-doubly_linked_lists/1-dlistint_len.c
https://raw.githubusercontent.com/RedaMjibel/alx-low_level_programming/fcb8bc3/0x17-doubly_linked_lists/1-dlistint_len.c
RedaMjibel/alx-low_level_programming fcb8bc3 0x17-doubly_linked_lists/1-dlistint_len.c
true
200
382
#include <stdlib.h> #include <string.h> #include <stdio.h> #include "lists.h" /** * dlistint_len - returns the number of elemnts in a doubly linked list * @h: head of the list * * Return: number of nodes */ size_t dlistint_len(const dlistint_t *h) { const dlistint_t *pointer = h; int i = 0; while (pointer !=...
4
DerrickWawerumuturi/alx-low_level_programming
5c3b84f
0x04-more_functions_nested_loops/6-print_line.c
C
www.github.com/DerrickWawerumuturi/alx-low_level_programming/tree/main/0x04-more_functions_nested_loops/6-print_line.c
https://raw.githubusercontent.com/DerrickWawerumuturi/alx-low_level_programming/5c3b84f/0x04-more_functions_nested_loops/6-print_line.c
DerrickWawerumuturi/alx-low_level_programming 5c3b84f 0x04-more_functions_nested_loops/6-print_line.c
true
200
281
#include "main.h" /** * print_line - prints a new line * @n: number of times the character '_ ' will be printed * Return: void */ void print_line(int n) { if (n <= 0) _putchar('\n'); else { int i; for (i = 1 ; i <= n ; i++) _putchar('_'); _putchar('\n'); } }
7
kamilsiu/dsa
567ba0d
arrays/concat.c
C
www.github.com/kamilsiu/dsa/tree/main/arrays/concat.c
https://raw.githubusercontent.com/kamilsiu/dsa/567ba0d/arrays/concat.c
kamilsiu/dsa 567ba0d arrays/concat.c
true
200
598
#include<stdio.h> #include<stdlib.h> int* getConcatenation(int* nums, int numsSize, int* returnSize) { *returnSize = 2 * numsSize; int *ans = (int*)malloc((*returnSize) * sizeof(int)); for (int i = 0; i < numsSize; i++) { ans[i] = nums[i]; ans[i + numsSize] = nums[i]; ...
2
kumaratul2111/Autograding_server
5834fe6
ver4/server.c
C
www.github.com/kumaratul2111/Autograding_server/tree/main/ver4/server.c
https://raw.githubusercontent.com/kumaratul2111/Autograding_server/5834fe6/ver4/server.c
kumaratul2111/Autograding_server 5834fe6 ver4/server.c
true
200
11,004
/* run using ./server <port> <thread_pool_size>*/ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <fcntl.h> #include <netinet/in.h> #include <pthread.h> #include <sys/time.h> #include <arpa/inet.h> struct request{ int request_id; int queue_index; }; struct request autograd...
0
riccardoperiotto/UniTN-146065-OperatingSystem
720c781
Project/lib/process.c
C
www.github.com/riccardoperiotto/UniTN-146065-OperatingSystem/tree/main/Project/lib/process.c
https://raw.githubusercontent.com/riccardoperiotto/UniTN-146065-OperatingSystem/720c781/Project/lib/process.c
riccardoperiotto/UniTN-146065-OperatingSystem 720c781 Project/lib/process.c
true
200
1,680
#include "../include/common.h" pid_t spawnWithPipe(char* programName, int* fd1, int *fd2) { pid_t childPid; //duplicate this process childPid = fork(); int errnum; if (childPid == -1) { //error section errnum = errno; fprintf(stderr, "errno = %d\n", errnum); ...
6
jthorat/Jayashri
89683d6
head_tail.c
C
www.github.com/jthorat/Jayashri/tree/main/head_tail.c
https://raw.githubusercontent.com/jthorat/Jayashri/89683d6/head_tail.c
jthorat/Jayashri 89683d6 head_tail.c
true
200
1,574
//4. Write a system programming your own version of head & tail command? #include<stdio.h> #include<sys/stat.h> #include<unistd.h> #include<fcntl.h> #include<string.h> #include<stdlib.h> // main function int main(int argc,char *argv[]) { //variable declarition int fd,i=0,j=0,n,choice; char ch,**p=NULL,*buff=NULL;...
5
Rizin4/LP-lab
30574f2
3. TwoPassAssembler/pass2.c
C
www.github.com/Rizin4/LP-lab/tree/main/3. TwoPassAssembler/pass2.c
https://raw.githubusercontent.com/Rizin4/LP-lab/30574f2/3.%20TwoPassAssembler/pass2.c
Rizin4/LP-lab 30574f2 3. TwoPassAssembler/pass2.c
true
200
4,194
#include<stdio.h> #include<string.h> #include<stdlib.h> char t1[20], t2[20], t3[20],t4[20],address[20],label[20],opcode[20],operand[20],length[20],size[10],a[10],ad[10],st_addr[20]; int s = -1, o=-1,i,j; FILE *fp1, *fp2, *fp3, *fp4, *fp5, *fp6, *fptr; struct SYMTAB { char label[20]; int addr[20]; ...
4
AlexanderDragiev/My-C-projects
aa8875f
evklid.c
C
www.github.com/AlexanderDragiev/My-C-projects/tree/main/evklid.c
https://raw.githubusercontent.com/AlexanderDragiev/My-C-projects/aa8875f/evklid.c
AlexanderDragiev/My-C-projects aa8875f evklid.c
true
200
432
#include <stdio.h> #include <stdlib.h> int NOD(int a,int b) { while(a != b) { if(a > b) { a=a-b; } else { b=b-a; } } return a; } int main() { int a=0,b=0; printf("Insert a: "); scanf("%d",&a); printf("Insert b: "); ...
7
Winnie644/alx-low_level_programming
3c2fee3
0x13-more_singly_linked_lists/3-add_nodeint_end.c
C
www.github.com/Winnie644/alx-low_level_programming/tree/main/0x13-more_singly_linked_lists/3-add_nodeint_end.c
https://raw.githubusercontent.com/Winnie644/alx-low_level_programming/3c2fee3/0x13-more_singly_linked_lists/3-add_nodeint_end.c
Winnie644/alx-low_level_programming 3c2fee3 0x13-more_singly_linked_lists/3-add_nodeint_end.c
true
200
770
#include "lists.h" /** * add_nodeint_end - adds a node to the end of the linked lists * @head: double pointer to head of lists * @n: integer data to put in new node * * Return: new linkled lists of linked lists */ listint_t *add_nodeint_end(listint_t **head, const int n) { listint_t *temp_head = NULL, *new_node ...
1
kekeli92/alx-low_level_programming
30b4d87
0x01-variables_if_else_while/6-print_numberz.c
C
www.github.com/kekeli92/alx-low_level_programming/tree/main/0x01-variables_if_else_while/6-print_numberz.c
https://raw.githubusercontent.com/kekeli92/alx-low_level_programming/30b4d87/0x01-variables_if_else_while/6-print_numberz.c
kekeli92/alx-low_level_programming 30b4d87 0x01-variables_if_else_while/6-print_numberz.c
true
200
271
#include <stdio.h> #include <stdlib.h> /** *main - program that prints all single digit numbers of base 10 starting from 0 * *Return: Always 0 (success) */ int main(void) { int num; for (num = '0'; num <= '9'; num++) { putchar(num); } putchar('\n'); return (0); }
2
SophieFaas/Portfolio_Fontys
898c01d
C_lang/AnimalShelter/test/administration_test.c
C
www.github.com/SophieFaas/Portfolio_Fontys/tree/main/C_lang/AnimalShelter/test/administration_test.c
https://raw.githubusercontent.com/SophieFaas/Portfolio_Fontys/898c01d/C_lang/AnimalShelter/test/administration_test.c
SophieFaas/Portfolio_Fontys 898c01d C_lang/AnimalShelter/test/administration_test.c
true
200
4,152
#include <string.h> #include "administration.h" #include "unity.h" #include "unity_test_module.h" // leave resource_detector.h as last include! #include "resource_detector.h" // I rather dislike keeping line numbers updated, so I made my own macro to ditch the line number #define MY_RUN_TEST(func) RUN_TEST(func, 0) ...
0
rushi-code/LSP_Assignments
3ae2c86
Assignment_No10/10_1.c
C
www.github.com/rushi-code/LSP_Assignments/tree/main/Assignment_No10/10_1.c
https://raw.githubusercontent.com/rushi-code/LSP_Assignments/3ae2c86/Assignment_No10/10_1.c
rushi-code/LSP_Assignments 3ae2c86 Assignment_No10/10_1.c
true
200
807
////////////////////////////////////////////////////////////////////////////////////// // // **Write a program which is used to create simple thread using pthread library** // ///////////////////////////////////////////////////////////////////////////////////// #include<stdio.h> #include<stdlib.h> #include<un...
6
YashTanna/C
f30f1b3
exp5.2/exp5.2.1.c
C
www.github.com/YashTanna/C/tree/main/exp5.2/exp5.2.1.c
https://raw.githubusercontent.com/YashTanna/C/f30f1b3/exp5.2/exp5.2.1.c
YashTanna/C f30f1b3 exp5.2/exp5.2.1.c
true
200
1,133
#include<stdio.h> //MATRIX MULTIPLICATION int main() { int row,col; printf("Enter rows of matrix\n"); scanf("%d",&row); printf("Enter colum of matrix\n"); scanf("%d",&col); int a[10][10],b[10][10],c[10][10]={0}; //INPUT printf("Enter first matrix\n"); for(int i=0;i<row;i++) { ...
5
savanabellone/CartorioEbac
30e4e36
CartorioEbac.c
C
www.github.com/savanabellone/CartorioEbac/tree/main/CartorioEbac.c
https://raw.githubusercontent.com/savanabellone/CartorioEbac/30e4e36/CartorioEbac.c
savanabellone/CartorioEbac 30e4e36 CartorioEbac.c
true
200
5,831
#include <stdio.h> //biblioteca de comunica��o com o usu�rio #include <stdlib.h> //biblioteca de aloca��o de espa�o em mem�ria #include <locale.h> //biblioteca de aloca��es de texto por regi�o #include <string.h> //biblioteca responsavel pelas strings (conjunto de info com mais de uma letra ou numero) int regist...
3
Iiguoren/linux
05ebc8c
APUE/thread/mysem/main.c
C
www.github.com/Iiguoren/linux/tree/main/APUE/thread/mysem/main.c
https://raw.githubusercontent.com/Iiguoren/linux/05ebc8c/APUE/thread/mysem/main.c
Iiguoren/linux 05ebc8c APUE/thread/mysem/main.c
true
200
1,546
#include <stdio.h> #include <stdlib.h> #include <sys/types.h> #include <unistd.h> #include <pthread.h> #include "mysem.h" #define LEFT 30000000 #define RIGHT 30000200 #define THREAD_NUM 201 #define N 4 struct str_int{ int num; }; /*static struct mysem *sem = mysem_init(N);*/ static struct mysem *sem=NULL; /*错误, C 语...
4
minseo13/C
57d3753
C_10/05112.c
C
www.github.com/minseo13/C/tree/main/C_10/05112.c
https://raw.githubusercontent.com/minseo13/C/57d3753/C_10/05112.c
minseo13/C 57d3753 C_10/05112.c
true
200
455
#include <stdio.h> int get_integer(void) { int n; printf("정수를 입력하시오: "); scanf("%d", &n); return n; } int is_prime(int n) { int i; for (i = 2; i <n; i++) { if(n%i == 0) return 0; } return 1; } int main(void) { int n; n = get_integer(); if (is_pr...
1
akshitgoyal038/Scheduling
7d0f13c
structures/heap.c
C
www.github.com/akshitgoyal038/Scheduling/tree/main/structures/heap.c
https://raw.githubusercontent.com/akshitgoyal038/Scheduling/7d0f13c/structures/heap.c
akshitgoyal038/Scheduling 7d0f13c structures/heap.c
true
200
1,860
#include <stdio.h> #include "heap.h" struct heap createHeap() { struct heap newHeap; newHeap.min = __INT_MAX__; newHeap.length = 0; return newHeap; } void insertHeap(struct heap *h, int ele, int index) { h->que[h->length] = ele; h->index[h->length] = index; h->length++; if (ele < ...
0
girma-tesfaye/alx-low_level_programming
8d47b1d
0x02-functions_nested_loops/10-add.c
C
www.github.com/girma-tesfaye/alx-low_level_programming/tree/main/0x02-functions_nested_loops/10-add.c
https://raw.githubusercontent.com/girma-tesfaye/alx-low_level_programming/8d47b1d/0x02-functions_nested_loops/10-add.c
girma-tesfaye/alx-low_level_programming 8d47b1d 0x02-functions_nested_loops/10-add.c
true
200
194
#include "main.h" /** * add -Entry * @a: int parameter * @b: int type parameter * Description: A function that adds two numbers * Return: 0 */ int add(int a, int b) { return (a + b); }
2
one-numan/c-language-code
c601ef7
transposematrix.c
C
www.github.com/one-numan/c-language-code/tree/main/transposematrix.c
https://raw.githubusercontent.com/one-numan/c-language-code/c601ef7/transposematrix.c
one-numan/c-language-code c601ef7 transposematrix.c
true
200
1,036
#include <stdio.h> void main() { int a[30][30]; //Its is a 2D Array int n; //n is for length int i; // row int j; //j is for column int temp; //temp is for holding temporary Value printf("Enter the Size of Array :"); scanf("%d", &n); //taking input printf("...
5
learnwithdev/FCP-Labs
974571a
b58.c
C
www.github.com/learnwithdev/FCP-Labs/tree/main/b58.c
https://raw.githubusercontent.com/learnwithdev/FCP-Labs/974571a/b58.c
learnwithdev/FCP-Labs 974571a b58.c
true
200
660
#include <stdio.h> void main(){ int arr1[10], arr2[10]; int sum[10]; for (int i=0; i<10; i++){ printf("Enter element %d for arr1: ", (i+1)); scanf("%d", &arr1[i]); } printf("\n"); for (int j=0; j<10; j++){ printf("Enter element %d for arr2: ", (j+1)); ...
3
Ashraf-Atef1/binary_trees
a73565a
0-binary_tree_node.c
C
www.github.com/Ashraf-Atef1/binary_trees/tree/main/0-binary_tree_node.c
https://raw.githubusercontent.com/Ashraf-Atef1/binary_trees/a73565a/0-binary_tree_node.c
Ashraf-Atef1/binary_trees a73565a 0-binary_tree_node.c
true
200
663
#include "binary_trees.h" /** * binary_tree_node - Creates a new binary tree node * @parent: Pointer to the parent node of the new node * @value: Value to be stored in the new node * * This function creates a new binary tree node with the given value * and sets its parent pointer to the provided parent node. * ...
7
Marynka-a/system_programming
fb081b2
с/creation_of_processes_in_Windows.c
C
www.github.com/Marynka-a/system_programming/tree/main/с/creation_of_processes_in_Windows.c
https://raw.githubusercontent.com/Marynka-a/system_programming/fb081b2/%D1%81/creation_of_processes_in_Windows.c
Marynka-a/system_programming fb081b2 с/creation_of_processes_in_Windows.c
true
200
1,100
//Calculate the sum of positive numbers among those valid numbers entered by the user. #include <stdio.h> #include <stdlib.h> // A function for counting the sum of positive numbers in an array double calculate_positive_sum(double numbers[], int size) { double sum = 0; for (int i = 0; i < size; i++) { ...
6
sebaslopez01/holbertonschool-low_level_programming
21a62de
bit_manipulation/1-print_binary.c
C
www.github.com/sebaslopez01/holbertonschool-low_level_programming/tree/main/bit_manipulation/1-print_binary.c
https://raw.githubusercontent.com/sebaslopez01/holbertonschool-low_level_programming/21a62de/bit_manipulation/1-print_binary.c
sebaslopez01/holbertonschool-low_level_programming 21a62de bit_manipulation/1-print_binary.c
true
200
780
#include "main.h" /** * get_pos_binary - Gets the binary position value * @num_digits: Position to get the value from * * Return: Position value */ unsigned long int get_pos_binary(int num_digits) { unsigned long int pos_binary = 1; while (num_digits != 0) { pos_binary *= 2; num_digits--; } return (pos...
4
RedSlifer/C-Algorithms
e3d02f8
bubble_sort.c
C
www.github.com/RedSlifer/C-Algorithms/tree/main/bubble_sort.c
https://raw.githubusercontent.com/RedSlifer/C-Algorithms/e3d02f8/bubble_sort.c
RedSlifer/C-Algorithms e3d02f8 bubble_sort.c
true
200
601
#include <stdio.h> #define SIZE 10 void bubble_sort(int array[], size_t size); int main() { int array[] = {1, 3, 4, 5, 3, 2, 6, 8, 9, 10}; bubble_sort(array, SIZE); for (size_t i = 0; i < SIZE; i++) { printf("%d ", array[i]); } return 0; } void bubble_sort(int array[], size_t size) { ...
1
SaaW008/alx-low_level_programming
327aed1
0x04-more_functions_nested_loops/1-isdigit.c
C
www.github.com/SaaW008/alx-low_level_programming/tree/main/0x04-more_functions_nested_loops/1-isdigit.c
https://raw.githubusercontent.com/SaaW008/alx-low_level_programming/327aed1/0x04-more_functions_nested_loops/1-isdigit.c
SaaW008/alx-low_level_programming 327aed1 0x04-more_functions_nested_loops/1-isdigit.c
true
200
226
#include "main.h" /** * _isdigit - check the character is between 1 and 9 * @c: tested variable * Return: 1 if is digit, 0 if not */ int _isdigit(int c) { if ((c >= 48) && (c <= 57)) return (1); else return (0); }
0
BarbraGitonga/alx-low_level_programming
c34b251
0x09-static_libraries/3-islower.c
C
www.github.com/BarbraGitonga/alx-low_level_programming/tree/main/0x09-static_libraries/3-islower.c
https://raw.githubusercontent.com/BarbraGitonga/alx-low_level_programming/c34b251/0x09-static_libraries/3-islower.c
BarbraGitonga/alx-low_level_programming c34b251 0x09-static_libraries/3-islower.c
true
200
217
#include<stdio.h> /** * _islower - checks if code is lower * @c: argument to be considered * Return: zero or one */ int _islower(int c) { if (c >= 97 && c <= 122) { return (1); } else { return (0); } }
2
luongvmanh/IOT301x
532ea20
Bai11.6_Lab11/main.c
C
www.github.com/luongvmanh/IOT301x/tree/main/Bai11.6_Lab11/main.c
https://raw.githubusercontent.com/luongvmanh/IOT301x/532ea20/Bai11.6_Lab11/main.c
luongvmanh/IOT301x 532ea20 Bai11.6_Lab11/main.c
true
200
515
#include <stdio.h> #include <stdlib.h> //Viết hàm cộng 2 số bằng con trỏ và gọi ra sử dụng ở int main. //Prototype int add2Num (int *pnum1, int *pnum2); int main() { int num1 = 6; int num2 = 18; int *pnum1 = &num1; int *pnum2 = &num2; int sum = add2Num(pnum1, pnum2); printf("%d plu...
3
cls-mig/CS50
dbf2df1
Arquivo/Módulo 3 - Algoritmos/testes/matriz.c
C
www.github.com/cls-mig/CS50/tree/main/Arquivo/Módulo 3 - Algoritmos/testes/matriz.c
https://raw.githubusercontent.com/cls-mig/CS50/dbf2df1/Arquivo/M%C3%B3dulo%203%20-%20Algoritmos/testes/matriz.c
cls-mig/CS50 dbf2df1 Arquivo/Módulo 3 - Algoritmos/testes/matriz.c
true
200
727
#include <stdio.h> int main() { /* - um ponteiro me permite criar um array de string, onde cada elemento é uma string (conjunto de caracteres) - uma matriz é uma forma semelhante de fazer a mesma coisa, a diferença está no espaço ocupado na memória - um array de caracteres é somente uma sequência de ca...
5
HenryChang6/NCKU_Computer_Organization
f388b77
HW1/2.c
C
www.github.com/HenryChang6/NCKU_Computer_Organization/tree/main/HW1/2.c
https://raw.githubusercontent.com/HenryChang6/NCKU_Computer_Organization/f388b77/HW1/2.c
HenryChang6/NCKU_Computer_Organization f388b77 HW1/2.c
true
200
838
#include <stdio.h> int main () { int a[10] = {0}, b[10] = {0}, c[10] = {0}; int i, arr_size = 10; FILE *input = fopen("../input/2.txt", "r"); for(i = 0; i < arr_size; i++) fscanf(input, "%d", &a[i]); for(i = 0; i < arr_size; i++) fscanf(input, "%d", &b[i]); for(i = 0; i < arr_size; i++) fscanf(i...
0
jevarg/breaker
51decd3
src/resource_manager.h
C
www.github.com/jevarg/breaker/tree/main/src/resource_manager.h
https://raw.githubusercontent.com/jevarg/breaker/51decd3/src/resource_manager.h
jevarg/breaker 51decd3 src/resource_manager.h
true
200
987
#pragma once #define TILE_WIDTH 16 #define TILE_HEIGHT TILE_WIDTH #define RES_ROOT_PATH "../assets" #define RES_UI_PATH RES_ROOT_PATH"/ui" #define RES_SFX_PATH RES_ROOT_PATH"/sfx" #define TILESET_RECT(i) { .w = TILE_WIDTH, .h = TILE_HEIGHT, .x = TILE_WIDTH * i, .y = 0 } #include <stdbool.h> #includ...
2
ThatisXiaoYao/ntut-homework
a37e9c8
week_7/reset.c
C
www.github.com/ThatisXiaoYao/ntut-homework/tree/main/week_7/reset.c
https://raw.githubusercontent.com/ThatisXiaoYao/ntut-homework/a37e9c8/week_7/reset.c
ThatisXiaoYao/ntut-homework a37e9c8 week_7/reset.c
true
200
252
#include <stdio.h> #include <stdlib.h> int main(void){ int n[10]; int i; for(i = 0; i < 10; i++){ n[i] = 0; } printf("%s%13s\n","Element", "Value"); for(i = 0; i < 10; i++){ printf("%7d%13d\n", i, n[i]); } system("pause"); return 0; }
3
sakura-ysy/MIT6.1810
60cb954
lab/xv6-lab7/kernel/e1000.c
C
www.github.com/sakura-ysy/MIT6.1810/tree/main/lab/xv6-lab7/kernel/e1000.c
https://raw.githubusercontent.com/sakura-ysy/MIT6.1810/60cb954/lab/xv6-lab7/kernel/e1000.c
sakura-ysy/MIT6.1810 60cb954 lab/xv6-lab7/kernel/e1000.c
true
200
4,937
#include "types.h" #include "param.h" #include "memlayout.h" #include "riscv.h" #include "spinlock.h" #include "proc.h" #include "defs.h" #include "e1000_dev.h" #include "net.h" #define TX_RING_SIZE 16 static struct tx_desc tx_ring[TX_RING_SIZE] __attribute__((aligned(16))); static struct mbuf *tx_mbufs[TX_RING_SIZE];...
0
krzem5/Operating_System
503a7a0
src/lib/shell/shell/builtin/cd.c
C
www.github.com/krzem5/Operating_System/tree/main/src/lib/shell/shell/builtin/cd.c
https://raw.githubusercontent.com/krzem5/Operating_System/503a7a0/src/lib/shell/shell/builtin/cd.c
krzem5/Operating_System 503a7a0 src/lib/shell/shell/builtin/cd.c
true
200
892
#include <shell/command.h> #include <shell/environment.h> #include <sys/error/error.h> #include <sys/fd/fd.h> #include <sys/io/io.h> #include <sys/mp/process.h> #include <sys/types.h> static s64 _command(shell_environment_t* env,shell_command_context_t* ctx){ if (ctx->argc<2){ sys_io_print("cd: not enough argumen...
2
wonyangs/42Seoul
0e8a7a6
piscine/RUSH01/ex00/array_factory.c
C
www.github.com/wonyangs/42Seoul/tree/main/piscine/RUSH01/ex00/array_factory.c
https://raw.githubusercontent.com/wonyangs/42Seoul/0e8a7a6/piscine/RUSH01/ex00/array_factory.c
wonyangs/42Seoul 0e8a7a6 piscine/RUSH01/ex00/array_factory.c
true
200
1,769
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* array_factory.c :+: :+: :+: ...
5
Live-Control-Project/MEEF
bb7c3b7
main/utils/spiffs.c
C
www.github.com/Live-Control-Project/MEEF/tree/main/main/utils/spiffs.c
https://raw.githubusercontent.com/Live-Control-Project/MEEF/bb7c3b7/main/utils/spiffs.c
Live-Control-Project/MEEF bb7c3b7 main/utils/spiffs.c
true
200
2,344
#include <stdio.h> #include <string.h> #include "esp_log.h" #include "esp_err.h" #include "esp_spiffs.h" #include "nvs_flash.h" #include "nvs.h" #include "spiffs.h" #define STORAGE_NAMESPACE "nvs_storage" static const char *TAG_spiffs = "storage"; /* Function to initialize SPIFFS for web_data */ esp_err_t mount_storag...
2
YeHuodeShenMing/MiniOS
33ff0a3
Lab3/第1题代码/1.3打印分区类型和LBA/inc/type.h
C
www.github.com/YeHuodeShenMing/MiniOS/tree/main/Lab3/第1题代码/1.3打印分区类型和LBA/inc/type.h
https://raw.githubusercontent.com/YeHuodeShenMing/MiniOS/33ff0a3/Lab3/%E7%AC%AC1%E9%A2%98%E4%BB%A3%E7%A0%81/1.3%E6%89%93%E5%8D%B0%E5%88%86%E5%8C%BA%E7%B1%BB%E5%9E%8B%E5%92%8CLBA/inc/type.h
YeHuodeShenMing/MiniOS 33ff0a3 Lab3/第1题代码/1.3打印分区类型和LBA/inc/type.h
true
200
1,244
#ifndef MINIOS_TYPE_H #define MINIOS_TYPE_H #ifndef NULL #define NULL ((void *) 0) #endif /* NULL */ typedef int i32; typedef unsigned int u32; typedef short i16; typedef unsigned short u16; typedef char i8; typedef unsigned char u8; // 通常描述一个对象的大小,会根据机器的型号变化类型 typedef u32 size_t; // signed size_t 通常描述系统调...
0
S235119/Assign3
7012b72
test1.c
C
www.github.com/S235119/Assign3/tree/main/test1.c
https://raw.githubusercontent.com/S235119/Assign3/7012b72/test1.c
S235119/Assign3 7012b72 test1.c
true
200
1,636
#include <pthread.h> #include <stdio.h> #include <stdlib.h> #include "aq.h" #include "aux.h" // Global queue to be shared between threads static AlarmQueue q; // Producer function that sends alarm messages to the queue void *producer_alarm(void *arg) { // Send the first alarm message. This should succeed right aw...
3
LuizMatheus-code/Linguagem-C
86af314
Estudonauta/Exercício15.c
C
www.github.com/LuizMatheus-code/Linguagem-C/tree/main/Estudonauta/Exercício15.c
https://raw.githubusercontent.com/LuizMatheus-code/Linguagem-C/86af314/Estudonauta/Exerc%C3%ADcio15.c
LuizMatheus-code/Linguagem-C 86af314 Estudonauta/Exercício15.c
true
200
1,271
/* Nome: Luiz Matheus Data: 10/05/2023 Descricao: Solicita a primeira nota e mostra a média juntamente com a situação escolar do aluno */ #include <stdio.h> #include <locale.h> void main() { //Transformando tudo em Português setlocale(LC_ALL, "Portuguese"); //Cabecalho (opcional) printf("<<< EX015 - ...
5
SharafatKarim/ansi-c-balagurusamy-exercise
e3b7001
solutions/monir/2/4.c
C
www.github.com/SharafatKarim/ansi-c-balagurusamy-exercise/tree/main/solutions/monir/2/4.c
https://raw.githubusercontent.com/SharafatKarim/ansi-c-balagurusamy-exercise/e3b7001/solutions/monir/2/4.c
SharafatKarim/ansi-c-balagurusamy-exercise e3b7001 solutions/monir/2/4.c
true
200
243
#include <stdio.h> int main() { int a, b, c; float x; printf("enter the value of a,b,c: \n"); scanf("%d%d%d", &a, &b, &c); x = (float)a / (float)(b - c); printf("The value of x is: %.2f", x); return 0; }
2
HeiMichael/42vienna---CommonCore
77d04aa
minishell/src/builtins/ft_export_2.c
C
www.github.com/HeiMichael/42vienna---CommonCore/tree/main/minishell/src/builtins/ft_export_2.c
https://raw.githubusercontent.com/HeiMichael/42vienna---CommonCore/77d04aa/minishell/src/builtins/ft_export_2.c
HeiMichael/42vienna---CommonCore 77d04aa minishell/src/builtins/ft_export_2.c
true
200
2,388
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_export_2.c :+: :+: :+: ...
0
rhsohan/ticket-booking-system
af003f0
Ticket Booking System.c
C
www.github.com/rhsohan/ticket-booking-system/tree/main/Ticket Booking System.c
https://raw.githubusercontent.com/rhsohan/ticket-booking-system/af003f0/Ticket%20Booking%20System.c
rhsohan/ticket-booking-system af003f0 Ticket Booking System.c
true
200
4,015
#include <stdio.h> #include <stdlib.h> #include <string.h> struct Ticket { int id; char name[50]; int seat; struct Ticket *next; }; struct Ticket *bookTicket(struct Ticket *head, int id, char name[], int seat); struct Ticket *cancelTicket(struct Ticket *head, int id); void displayTickets(struct Ticket...
5
selebedidim/alx-low_level_programming
d46d2cd
0x12-singly_linked_lists/2-add_node.c
C
www.github.com/selebedidim/alx-low_level_programming/tree/main/0x12-singly_linked_lists/2-add_node.c
https://raw.githubusercontent.com/selebedidim/alx-low_level_programming/d46d2cd/0x12-singly_linked_lists/2-add_node.c
selebedidim/alx-low_level_programming d46d2cd 0x12-singly_linked_lists/2-add_node.c
true
200
693
#include "lists.h" /** * add_node - adds a new node at the beginning of a list_t list * @head:pointer to a pointer to the head of the list * @str:string to be duplicated and added as the content of new code * * Return:the address of new element(new_node) * if fails return null */ list_t *add_node(list_t...
3
skyhua0224/Ordering
39e062e
admin_menu.c
C
www.github.com/skyhua0224/Ordering/tree/main/admin_menu.c
https://raw.githubusercontent.com/skyhua0224/Ordering/39e062e/admin_menu.c
skyhua0224/Ordering 39e062e admin_menu.c
true
200
6,609
#include <stdio.h> #include <stdlib.h> #include "color.h" #include "dish.h" #include "receipt.h" #include "payment.h" #include <unistd.h> #include "table.h" #include "receipt.h" #include <time.h> #include "adminOrder.h" // dishMenu函数的声明,该函数用于显示菜品管理菜单 void dishMenu(); // manageTable函数的声明,该函数用于显示桌台管理菜单 void manageTabl...
2
ArLazz/operational-networks
68eca81
osi/hw5/task5_1.c
C
www.github.com/ArLazz/operational-networks/tree/main/osi/hw5/task5_1.c
https://raw.githubusercontent.com/ArLazz/operational-networks/68eca81/osi/hw5/task5_1.c
ArLazz/operational-networks 68eca81 osi/hw5/task5_1.c
true
200
3,635
#include <stdio.h> #include <stdlib.h> #include <string.h> typedef struct N1 { char mychar; struct N1 *next; } l1; typedef struct N { char *c; struct N *next; struct N *prev; } l2; l1 *plus1(l1 *lst) { l1 *t; t = (struct N1 *) malloc(sizeof(l1)); lst->next = t; t->next = NULL; ...
0
knammm/MCU-LAB-3
31b051a
source/Core/Inc/main.h
C
www.github.com/knammm/MCU-LAB-3/tree/main/source/Core/Inc/main.h
https://raw.githubusercontent.com/knammm/MCU-LAB-3/31b051a/source/Core/Inc/main.h
knammm/MCU-LAB-3 31b051a source/Core/Inc/main.h
true
200
3,392
/* USER CODE BEGIN Header */ /** ****************************************************************************** * @file : main.h * @brief : Header for main.c file. * This file contains the common defines of the application. *************************************************...
5
KChugh2903/jet-vanes-flight-software
085a3b7
MainMCU/Core/Include/telemetry.h
C
www.github.com/KChugh2903/jet-vanes-flight-software/tree/main/MainMCU/Core/Include/telemetry.h
https://raw.githubusercontent.com/KChugh2903/jet-vanes-flight-software/085a3b7/MainMCU/Core/Include/telemetry.h
KChugh2903/jet-vanes-flight-software 085a3b7 MainMCU/Core/Include/telemetry.h
true
200
638
#ifndef TELEMETRY_H #define TELEMETRY_H #include "stdint.h" #include "state_flash.h" #include "state_tx.h" #include "adc_convert.h" #define TELEMETRY_SEND_TIMEOUT 100 #define TX_PACKET_BUFFER_SIZE 258 #define MAX_PACKET_SIZE_TELEMETRY 64 #define MAX_PACKET_SIZE_STATE 256 #define MAX_PACKETS_QUEUED 4 #define TX_MESSAG...
3
kimbreathe/Security-Academy
a6be331
System/bof.c
C
www.github.com/kimbreathe/Security-Academy/tree/main/System/bof.c
https://raw.githubusercontent.com/kimbreathe/Security-Academy/a6be331/System/bof.c
kimbreathe/Security-Academy a6be331 System/bof.c
true
200
357
#include <stdio.h> char buf[256]; char password[16]; int main(void) { srand(time(Null)); for (int 1=0; 1< 15; 1++) password[i] = rand() % 26 + 'a'; password[16] = '\0'; printf("password : "); gets(input); if(!memcmp(input, password,15)) puts("Good job!"); else put...
2
williamsudk/simple_shell
87ec118
realloc.c
C
www.github.com/williamsudk/simple_shell/tree/main/realloc.c
https://raw.githubusercontent.com/williamsudk/simple_shell/87ec118/realloc.c
williamsudk/simple_shell 87ec118 realloc.c
true
200
1,158
#include "shell.h" /** * _memset - fills up memory with constant byte. * @s: pointer to memory area. * @b: The byte to fill *s with * @n: amount of bytes to be filled * * Return: (s) pointer to the memory area s. */ char *_memset(char *s, char b, unsigned int n) { unsigned int i; for (i = 0; i < n; i++) ...
0
learnwithdev/FCP-Labs
974571a
b40.c
C
www.github.com/learnwithdev/FCP-Labs/tree/main/b40.c
https://raw.githubusercontent.com/learnwithdev/FCP-Labs/974571a/b40.c
learnwithdev/FCP-Labs 974571a b40.c
true
200
225
#include <stdio.h> int main(){ int i; int sum = 0; while (1){ printf("Enter a number: "); scanf("%d", &i); if (i>=0){ sum += i; } else{ break; } } printf("The sum: %d\n", sum); }
3
NekodaMushi/holbertonschool-low_level_programming
f6f17c9
variables_if_else_while/9-print_comb.c
C
www.github.com/NekodaMushi/holbertonschool-low_level_programming/tree/main/variables_if_else_while/9-print_comb.c
https://raw.githubusercontent.com/NekodaMushi/holbertonschool-low_level_programming/f6f17c9/variables_if_else_while/9-print_comb.c
NekodaMushi/holbertonschool-low_level_programming f6f17c9 variables_if_else_while/9-print_comb.c
true
200
291
#include <stdlib.h> #include <stdio.h> /** * * main - Most important part of the code * * Return: 0 if succeeded right */ int main(void) { int n; for (n = 48; n <= 57; n++) { putchar(n); if (n == 57) continue; putchar(44); putchar(32); } putchar('\n'); return (0); }
5
JustineHeadbush/alx-low_level_programming
c00445d
0x04-more_functions_nested_loops/7-print_diagonal.c
C
www.github.com/JustineHeadbush/alx-low_level_programming/tree/main/0x04-more_functions_nested_loops/7-print_diagonal.c
https://raw.githubusercontent.com/JustineHeadbush/alx-low_level_programming/c00445d/0x04-more_functions_nested_loops/7-print_diagonal.c
JustineHeadbush/alx-low_level_programming c00445d 0x04-more_functions_nested_loops/7-print_diagonal.c
true
200
410
#include "main.h" /** * print_diagonal - draws a diagonal line on the terminal. * @n: number of times the character \ should be printed. */ void print_diagonal(int n) { int diag; int line; if (n > 0) { for (diag = 0; diag < n; diag++) { for (line = 0; line < diag; line++) _putchar(' '); _putchar('...
2
sao-concept/alx-low_level_programming
0dc3e2b
0x0B-malloc_free/1-strdup.c
C
www.github.com/sao-concept/alx-low_level_programming/tree/main/0x0B-malloc_free/1-strdup.c
https://raw.githubusercontent.com/sao-concept/alx-low_level_programming/0dc3e2b/0x0B-malloc_free/1-strdup.c
sao-concept/alx-low_level_programming 0dc3e2b 0x0B-malloc_free/1-strdup.c
true
200
550
/** * _strdup -This function returns a pointer to a newly allocated space * in memory, which contains a copy of the string given as a parameter. * @str: pointer parameter * Return: pointer character */ #include <stdlib.h> #include "main.h" char *_strdup(char *str) { char *copy; int count, len = 0; if (str == NULL) r...
0
roomate/Algorithmy-in-C
f248ba1
IN101/TP2/tree.c
C
www.github.com/roomate/Algorithmy-in-C/tree/main/IN101/TP2/tree.c
https://raw.githubusercontent.com/roomate/Algorithmy-in-C/f248ba1/IN101/TP2/tree.c
roomate/Algorithmy-in-C f248ba1 IN101/TP2/tree.c
true
200
911
#include <stdlib.h> #include <stdio.h> int poww(int a, int n) { int res = 1; for (int i = 0; i < n; i++) { res *= a; } return res; } void space_extr(int n) { for (int i = 0; i < poww(2, n) - 1; i++) { printf(" "); } } void space_inter(int n) { ...
3
Ipoops/alx-low_level_programming
6f8ca88
0x14-bit_manipulation/1-print_binary.c
C
www.github.com/Ipoops/alx-low_level_programming/tree/main/0x14-bit_manipulation/1-print_binary.c
https://raw.githubusercontent.com/Ipoops/alx-low_level_programming/6f8ca88/0x14-bit_manipulation/1-print_binary.c
Ipoops/alx-low_level_programming 6f8ca88 0x14-bit_manipulation/1-print_binary.c
true
200
781
#include "main.h" /** * _power - calculate (base and power) * @base: base of the exponent * @pow: power of the exponent * Return: value of base and power */ unsigned long int _power(unsigned int base, unsigned int pow) { unsigned long int num; unsigned int i; num = 1; for (i = 1; i <= pow; i++) num *= bas...
2
Xaregames/Langue-Programm-and-Menot-Traslate
d5eb20d
labs/lab2/task3.c
C
www.github.com/Xaregames/Langue-Programm-and-Menot-Traslate/tree/main/labs/lab2/task3.c
https://raw.githubusercontent.com/Xaregames/Langue-Programm-and-Menot-Traslate/d5eb20d/labs/lab2/task3.c
Xaregames/Langue-Programm-and-Menot-Traslate d5eb20d labs/lab2/task3.c
true
200
938
#include <stdio.h> #include <stdlib.h> // Для функции rand #include <time.h> int main(int argc, char *argv[]) { srand(time(NULL)); // для того чтобы при каждом запуске программы числа менялись int sizeMass = atoi(argv[1]); // atoi функция которая преобразует тип char в int float massR...
5
Lucas-Morais-Freire/algs-e-est.-dados
3115e6a
binary-tree/avlmain.c
C
www.github.com/Lucas-Morais-Freire/algs-e-est.-dados/tree/main/binary-tree/avlmain.c
https://raw.githubusercontent.com/Lucas-Morais-Freire/algs-e-est.-dados/3115e6a/binary-tree/avlmain.c
Lucas-Morais-Freire/algs-e-est.-dados 3115e6a binary-tree/avlmain.c
true
200
502
#include <stdio.h> #include <stdlib.h> #include "bstavl.h" #include <time.h> int main() { srand(time(NULL)); struct bstavl* tree = avl_inicialize(); for (int i = 0; i < 300;) { int n = rand() % 200 - 100; if (!avl_searchIter(tree, n)) { avl_insert(n, tree); i++; ...
0
LuizCarlosBergamini/CS50-Projects-C
90e2c7f
array-test/array.c
C
www.github.com/LuizCarlosBergamini/CS50-Projects-C/tree/main/array-test/array.c
https://raw.githubusercontent.com/LuizCarlosBergamini/CS50-Projects-C/90e2c7f/array-test/array.c
LuizCarlosBergamini/CS50-Projects-C 90e2c7f array-test/array.c
true
200
357
#include <cs50.h> #include <stdio.h> int main(void) { int length; { length = get_int("Length: "); } while (length < 1); int powerOf2[length]; powerOf2[0] = 1; printf("%i\n", powerOf2[0]); for (int i = 1; i < length; i++) { powerOf2[i] = 2 * powerOf2[i - 1]; ...
3
madonnamagdymoussa/LED_CONTROL_AUTOSAR
8365420
ControlLed_StaticCode_V2/Task.h
C
www.github.com/madonnamagdymoussa/LED_CONTROL_AUTOSAR/tree/main/ControlLed_StaticCode_V2/Task.h
https://raw.githubusercontent.com/madonnamagdymoussa/LED_CONTROL_AUTOSAR/8365420/ControlLed_StaticCode_V2/Task.h
madonnamagdymoussa/LED_CONTROL_AUTOSAR 8365420 ControlLed_StaticCode_V2/Task.h
true
200
325
#ifndef TASK_H_ #define TASK_H_ #include "Port.h" #include "DIO.h" #include "lstd.h" void TaskA_ReadButtonState(void); void InitializeTasks(void); void TaskB_SwitchStates(void); typedef enum{ WhiteLed_State, RedLed_State, GreenLed_State, BlueLed_State }States_t; #endif /* TASK_H_...
7
Rosemwende/alx-low_level_programming
7e39df7
0x02-functions_nested_loops/102-fibonacci.c
C
www.github.com/Rosemwende/alx-low_level_programming/tree/main/0x02-functions_nested_loops/102-fibonacci.c
https://raw.githubusercontent.com/Rosemwende/alx-low_level_programming/7e39df7/0x02-functions_nested_loops/102-fibonacci.c
Rosemwende/alx-low_level_programming 7e39df7 0x02-functions_nested_loops/102-fibonacci.c
true
200
404
#include <stdio.h> /** * main - Entry point * * Description: prints the sum of the even-valued terms, * followed by a new line. * * Return: Always 0 (Success) */ int main(void) { long int first = 1, second = 2, next; printf("%ld, %ld", first, second); for (int i = 2; i < 50; i++) { next = first + second; pri...
2
brianwyld/ble_nrf51_light
06154a7
src/uart_comm.c
C
www.github.com/brianwyld/ble_nrf51_light/tree/main/src/uart_comm.c
https://raw.githubusercontent.com/brianwyld/ble_nrf51_light/06154a7/src/uart_comm.c
brianwyld/ble_nrf51_light 06154a7 src/uart_comm.c
true
200
8,621
/* uart_comm.c : handle the UART used for the communication with host ie AT commands */ #include <stdint.h> #include <string.h> #include <inttypes.h> #include <stdio.h> #include "nrf_drv_gpiote.h" #include "app_uart.h" #include "wutils.h" #include "main.h" #include "bsp_minew_nrf51.h" #include "at_process.h" #incl...
0
cu-ecen-aeld/assignments-3-and-later-Davidtober
fca6a44
finder-app/writer.c
C
www.github.com/cu-ecen-aeld/assignments-3-and-later-Davidtober/tree/main/finder-app/writer.c
https://raw.githubusercontent.com/cu-ecen-aeld/assignments-3-and-later-Davidtober/fca6a44/finder-app/writer.c
cu-ecen-aeld/assignments-3-and-later-Davidtober fca6a44 finder-app/writer.c
true
200
848
#include <syslog.h> #include <stdio.h> int main(int argc, char *argv[]) { openlog("writer", LOG_PID | LOG_CONS, LOG_USER); if (argc <= 2) { syslog(LOG_ERR, "Not enough arguments provided\n"); closelog(); return 1; } char *writeFile = argv[1]; char *writeString = argv[2]...
4
xj75q/learning-c-with-sample
8feaf11
studyCode/a-48.c
C
www.github.com/xj75q/learning-c-with-sample/tree/main/studyCode/a-48.c
https://raw.githubusercontent.com/xj75q/learning-c-with-sample/8feaf11/studyCode/a-48.c
xj75q/learning-c-with-sample 8feaf11 studyCode/a-48.c
true
200
1,248
#include <stdio.h> #include <stdlib.h> struct node { int data; struct node *next; }; struct node *head = NULL; struct node *current = NULL; //Create Linked List void insert(int data) { // Allocate memory for new node; struct node *link = (struct node*) malloc(sizeof(struct node)); link->data = d...
5
RifkiAhmed/monty
c47b317
main.c
C
www.github.com/RifkiAhmed/monty/tree/main/main.c
https://raw.githubusercontent.com/RifkiAhmed/monty/c47b317/main.c
RifkiAhmed/monty c47b317 main.c
true
200
825
#include "monty.h" var_t var; /** * main - executes code * @argc: number of arguments * @argv: arguments vector * * Return: 0, or "EXIT_FAILURE" if it fails */ int main(int argc, char **argv) { stack_t *stack = NULL; size_t n = 0; char *opcode; FILE *file; if (argc != 2) { fprintf(stderr, "USAGE: monty ...
6
FarmEquipment69/Fortnite-23.10-CL-23572221-SDK-Dump
c9b8e07
FSafeZoneLocationParams.h
C
www.github.com/FarmEquipment69/Fortnite-23.10-CL-23572221-SDK-Dump/tree/main/FSafeZoneLocationParams.h
https://raw.githubusercontent.com/FarmEquipment69/Fortnite-23.10-CL-23572221-SDK-Dump/c9b8e07/FSafeZoneLocationParams.h
FarmEquipment69/Fortnite-23.10-CL-23572221-SDK-Dump c9b8e07 FSafeZoneLocationParams.h
true
200
717
// ScriptStruct /Script/FortniteGame.SafeZoneLocationParams // Size: 0x60 struct FSafeZoneLocationParams { int SafeZoneIndex; // 0x0 (0x4) unsigned char unreflected_4[0x4]; // 0x4 (0x4) struct FVector AnchorLocation; // 0x8 (0x18) float Radius; // 0x20 (0x4) float MaxRadius; // 0x24 (0x4) float ForceDistanceMin;...
3
Saoskywalker/F113
1e8b47c
main.c
C
www.github.com/Saoskywalker/F113/tree/main/main.c
https://raw.githubusercontent.com/Saoskywalker/F113/1e8b47c/main.c
Saoskywalker/F113 1e8b47c main.c
true
200
10,067
#include "app_global.h" #include "types_base.h" #include "timer_port.h" #include "gpio_board.h" #include "pwm_board.h" #include "adc_board.h" #include "watch_dog_port.h" #include "display_define.h" #include "envent_define.h" #include "app_timer.h" // app_flag_type app_flag_= 0;//{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
1
moonatomic/informatics
2db4ab5
LinearRegression/main.c
C
www.github.com/moonatomic/informatics/tree/main/LinearRegression/main.c
https://raw.githubusercontent.com/moonatomic/informatics/2db4ab5/LinearRegression/main.c
moonatomic/informatics 2db4ab5 LinearRegression/main.c
true
200
2,032
/* (c) 2022 Петров Михаил Вадимович группа 112 */ #include "headers.h" #include <stdio.h> #define ARR_LEN 100 int main(void) { double pointsX[ARR_LEN]; // Координаты точек на вход double pointsY[ARR_LEN]; double ans[2]; // Пара для коэффициентов прямой регрессии double xval, yval; // Координаты вводим...
2
Aken20/get_next_line
8e50d4a
get_next_line.c
C
www.github.com/Aken20/get_next_line/tree/main/get_next_line.c
https://raw.githubusercontent.com/Aken20/get_next_line/8e50d4a/get_next_line.c
Aken20/get_next_line 8e50d4a get_next_line.c
true
200
2,454
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* get_next_line.c :+: :+: :+: ...
7
Xenon22pc/Barcode_Test_stand
367f47b
lib/EPD/DEV_Config.c
C
www.github.com/Xenon22pc/Barcode_Test_stand/tree/main/lib/EPD/DEV_Config.c
https://raw.githubusercontent.com/Xenon22pc/Barcode_Test_stand/367f47b/lib/EPD/DEV_Config.c
Xenon22pc/Barcode_Test_stand 367f47b lib/EPD/DEV_Config.c
true
200
3,361
/***************************************************************************** * | File : DEV_Config.c * | Author : Waveshare team * | Function : Hardware underlying interface * | Info : *---------------- * | This version: V1.0 * | Date : 2020-02-19 * | Info : # # Permission...
5
ljw66/STRUT_1
f7b5b63
data/experiment_1/test _code/TheAlgorithm_C/hash_contains_test.c
C
www.github.com/ljw66/STRUT_1/tree/main/data/experiment_1/test _code/TheAlgorithm_C/hash_contains_test.c
https://raw.githubusercontent.com/ljw66/STRUT_1/f7b5b63/data/experiment_1/test%20_code/TheAlgorithm_C/hash_contains_test.c
ljw66/STRUT_1 f7b5b63 data/experiment_1/test _code/TheAlgorithm_C/hash_contains_test.c
true
200
2,517
void test_contains_up(void); void test_contains_down(void); void test_contains_up(void){ aunit_printf("\n##FUNCTION_START_contains\n"); } void test_contains_down(void){ aunit_printf("\n##FUNCTION_END_contains\n"); } void abnormal_contains_case(int index); void abnormal_contains_case(int ind...
3
knwble/alx-low_level_programming
6eec5ab
0x17-doubly_linked_lists/2-add_dnodeint.c
C
www.github.com/knwble/alx-low_level_programming/tree/main/0x17-doubly_linked_lists/2-add_dnodeint.c
https://raw.githubusercontent.com/knwble/alx-low_level_programming/6eec5ab/0x17-doubly_linked_lists/2-add_dnodeint.c
knwble/alx-low_level_programming 6eec5ab 0x17-doubly_linked_lists/2-add_dnodeint.c
true
200
461
#include "lists.h" /** * add_dnodeint - adds a new node at the beginning list * * @head: head of the list * @n: value of the element * Return: the address of the new element */ dlistint_t *add_dnodeint(dlistint_t **head, const int n) { dlistint_t *new; new = malloc(sizeof(dlistint_t)); if (new == NULL) re...
4
1010Gabriel0101/Clase_09-10-23
ca9b714
Actividad 3.c
C
www.github.com/1010Gabriel0101/Clase_09-10-23/tree/main/Actividad 3.c
https://raw.githubusercontent.com/1010Gabriel0101/Clase_09-10-23/ca9b714/Actividad%203.c
1010Gabriel0101/Clase_09-10-23 ca9b714 Actividad 3.c
true
200
254
#include <stdio.h> #include <string.h> int main(){ char x[] = "hola mundo"; char y[12]; int i; for(i = 0;i<strlen(x);i++) { if(x[i] == ' '){ y[i] = ' '; } else { y[i] = x[i] - 32; } printf("%c",y[i]); } }
0
Tejswinisutar/C_Program
71f997a
Poniter_Arithmetic/04_Pointer Arithmetic Decrement By Intergral Constant.c
C
www.github.com/Tejswinisutar/C_Program/tree/main/Poniter_Arithmetic/04_Pointer Arithmetic Decrement By Intergral Constant.c
https://raw.githubusercontent.com/Tejswinisutar/C_Program/71f997a/Poniter_Arithmetic/04_Pointer%20Arithmetic%20Decrement%20By%20Intergral%20Constant.c
Tejswinisutar/C_Program 71f997a Poniter_Arithmetic/04_Pointer Arithmetic Decrement By Intergral Constant.c
true
200
867
#include<stdio.h> #include<conio.h> int main() { int Num[5] = {15,59,88,27,65}; int *Ptr = &Num[4]; printf("\n Base Address of Array is = %d", Num); /// 6356696 printf("\n Value in Pointer is = %d", Ptr); /// 6356712 printf("\n Value of Array Element Where Pointer Pointing ...
6
whowillbellthecat/psh
495c5d4
os.c
C
www.github.com/whowillbellthecat/psh/tree/main/os.c
https://raw.githubusercontent.com/whowillbellthecat/psh/495c5d4/os.c
whowillbellthecat/psh 495c5d4 os.c
true
200
2,794
#include <sys/types.h> #include <sys/ioctl.h> #include <sys/wait.h> #include <dirent.h> #include <signal.h> #include <termios.h> #include <time.h> #include <unistd.h> #include <gprolog.h> PlBool tz(PlLong *t) { extern long timezone; tzset(); *t = timezone; return PL_TRUE; } PlBool force_set(PlLong ofd, PlLong nfd...
1
calmsacibis995/uw2-src
95995ce
usr/src/common/lib/libc/port/str/strchr.c
C
www.github.com/calmsacibis995/uw2-src/tree/main/usr/src/common/lib/libc/port/str/strchr.c
https://raw.githubusercontent.com/calmsacibis995/uw2-src/95995ce/usr/src/common/lib/libc/port/str/strchr.c
calmsacibis995/uw2-src 95995ce usr/src/common/lib/libc/port/str/strchr.c
true
200
759
/* Copyright (c) 1990, 1991, 1992, 1993, 1994 Novell, Inc. All Rights Reserved. */ /* Copyright (c) 1988, 1990 Novell, Inc. All Rights Reserved. */ /* All Rights Reserved */ /* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF Novell Inc. */ /* The copyright notice above does not evidence any */ /* actual or inten...
3
gauthierfagot/42sh
a135e3e
src/shell/execute/execute_command.c
C
www.github.com/gauthierfagot/42sh/tree/main/src/shell/execute/execute_command.c
https://raw.githubusercontent.com/gauthierfagot/42sh/a135e3e/src/shell/execute/execute_command.c
gauthierfagot/42sh a135e3e src/shell/execute/execute_command.c
true
200
1,960
/* ** EPITECH PROJECT, 2024 ** handle a command in the shell ** File description: ** . */ #include <stdbool.h> #include <unistd.h> #include <stdlib.h> #include <stdio.h> #include <string.h> #include <sys/wait.h> #include <sys/stat.h> #include "built_in.h" #include "functions.h" static int try_shell_command(char **arg...
2
Omar22Khaled/alx-low_level_programming
d59bcd8
0x05-pointers_arrays_strings/2-strlen.c
C
www.github.com/Omar22Khaled/alx-low_level_programming/tree/main/0x05-pointers_arrays_strings/2-strlen.c
https://raw.githubusercontent.com/Omar22Khaled/alx-low_level_programming/d59bcd8/0x05-pointers_arrays_strings/2-strlen.c
Omar22Khaled/alx-low_level_programming d59bcd8 0x05-pointers_arrays_strings/2-strlen.c
true
200
193
#include <stdio.h> /** * _strlen - returns the l * @s: string to e * * Return: the length o */ int _strlen(char *s) { int i; i = 0; while (s[i] != '\0') { i++; } return (i); }
7
ani21das/codingBasic
bc07578
data structure & algorithm/linked list/single_circular_linked_list/split.c
C
www.github.com/ani21das/codingBasic/tree/main/data structure & algorithm/linked list/single_circular_linked_list/split.c
https://raw.githubusercontent.com/ani21das/codingBasic/bc07578/data%20structure%20%26%20algorithm/linked%20list/single_circular_linked_list/split.c
ani21das/codingBasic bc07578 data structure & algorithm/linked list/single_circular_linked_list/split.c
true
200
1,960
#include<stdio.h> #include<stdlib.h> struct node { int data; struct node *next; }; struct node *start,*last,*p,*temp,*start1,*start2,*last1,*last2; int n,m,i,element,t,loc; void listmake(); void display(); void nth_traverse(); int main() { printf("\nEnter total no of nodes in the list:"); scanf("%d",&n)...
5
AliAkbarRayhan/Coding
28cf183
operator 3.c
C
www.github.com/AliAkbarRayhan/Coding/tree/main/operator 3.c
https://raw.githubusercontent.com/AliAkbarRayhan/Coding/28cf183/operator%203.c
AliAkbarRayhan/Coding 28cf183 operator 3.c
true
200
1,093
/* You are given a string S consisting only +(Addition),*(Multiplication). The next line will contain two positive values. Now, Calculate the sum of every operations. See the explanation for more clarification. Input Format First line contains a string S, consisting only +(Addition),*(Multiplication) ...
4
kulaizki/BSCS3
cf9d232
CS-3102/Algorithms/Sorting/counting-sort.c
C
www.github.com/kulaizki/BSCS3/tree/main/CS-3102/Algorithms/Sorting/counting-sort.c
https://raw.githubusercontent.com/kulaizki/BSCS3/cf9d232/CS-3102/Algorithms/Sorting/counting-sort.c
kulaizki/BSCS3 cf9d232 CS-3102/Algorithms/Sorting/counting-sort.c
true
200
999
#include <stdio.h> #include <stdlib.h> int* countingSort(int a[], int n); void display(int a[], int n); int main() { int a[10] = {3, 2, 1, 4, 8, 21, 0, 1, 1, 4}; printf("Initial: "); display(a, 10); int* sorted = countingSort(a, 10); printf("Sorted: "); display(sorted, 10); } int* countingS...
6
zneeep/Zappy
833d82e
server/init/server/init_server.c
C
www.github.com/zneeep/Zappy/tree/main/server/init/server/init_server.c
https://raw.githubusercontent.com/zneeep/Zappy/833d82e/server/init/server/init_server.c
zneeep/Zappy 833d82e server/init/server/init_server.c
true
200
1,505
/* ** EPITECH PROJECT, 2023 ** myteams ** File description: ** init_server */ #include "init.h" int bind_socket(server_t *server) { socklen_t size = sizeof(server->addr); if (bind(server->socket, (struct sockaddr *)&server->addr, size) == -1) { perror("bind"); return false; } if (list...
1
Fatima-ezzahra1/alx-low_level_programming
7e44c8d
0x02-functions_nested_loops/5-sign.c
C
www.github.com/Fatima-ezzahra1/alx-low_level_programming/tree/main/0x02-functions_nested_loops/5-sign.c
https://raw.githubusercontent.com/Fatima-ezzahra1/alx-low_level_programming/7e44c8d/0x02-functions_nested_loops/5-sign.c
Fatima-ezzahra1/alx-low_level_programming 7e44c8d 0x02-functions_nested_loops/5-sign.c
true
200
339
# include "main.h" /** * print_sign-check the sign of number *@n:Number * Return:1 if n i positive : 0 if n is 0:-1 if n is negative */ int print_sign(int n) { if (n > 0) { _putchar('+'); { return (1); } } else if (n < 0) { _putchar ('-'); { return (-1); } } else { _putchar('0'); { ret...
0
DixhaTiwari/C-Programs
b7b6bb6
Arrays/Rotate_Array_Using_Swap_And_Function.c
C
www.github.com/DixhaTiwari/C-Programs/tree/main/Arrays/Rotate_Array_Using_Swap_And_Function.c
https://raw.githubusercontent.com/DixhaTiwari/C-Programs/b7b6bb6/Arrays/Rotate_Array_Using_Swap_And_Function.c
DixhaTiwari/C-Programs b7b6bb6 Arrays/Rotate_Array_Using_Swap_And_Function.c
true
200
692
/* Ques : Rotate the given array 'a' by k steps, where k is non-negative. Note : k can be greater than n as well where n is the size of array 'a'. */ #include<stdio.h> void Reverse(int arr[],int Starting_Index,int Ending_Index) { for(int i=Starting_Index,j=Ending_Index;i<j;i++,j--) //This function...
3
SAP-archive/fedem-gui
2abdea5
src/FFuLib/FFuCustom/components/BladeDrawer.C
C
www.github.com/SAP-archive/fedem-gui/tree/main/src/FFuLib/FFuCustom/components/BladeDrawer.C
https://raw.githubusercontent.com/SAP-archive/fedem-gui/2abdea5/src/FFuLib/FFuCustom/components/BladeDrawer.C
SAP-archive/fedem-gui 2abdea5 src/FFuLib/FFuCustom/components/BladeDrawer.C
true
200
1,334
// SPDX-FileCopyrightText: 2023 SAP SE // // SPDX-License-Identifier: Apache-2.0 // // This file is part of FEDEM - https://openfedem.org //////////////////////////////////////////////////////////////////////////////// #include "FFuLib/FFuCustom/components/BladeDrawer.H" BladeDrawer::BladeDrawer( QWidget* parent) : ...
5
CodeTusharSingh/ADA-Assignment-C-language
82abc07
GA_1_Huffman.c
C
www.github.com/CodeTusharSingh/ADA-Assignment-C-language/tree/main/GA_1_Huffman.c
https://raw.githubusercontent.com/CodeTusharSingh/ADA-Assignment-C-language/82abc07/GA_1_Huffman.c
CodeTusharSingh/ADA-Assignment-C-language 82abc07 GA_1_Huffman.c
true
200
3,926
#include <stdio.h> #include <stdlib.h> #include <string.h> // Node structure for Huffman tree struct Node { char data; unsigned frequency; struct Node *left, *right; }; // Priority queue structure struct PriorityQueue { unsigned size; unsigned capacity; struct Node** array; }; // Create a new...
7
maxilham01/Dasar-pemograman
8c7c124
gabut/Strukdat.c
C
www.github.com/maxilham01/Dasar-pemograman/tree/main/gabut/Strukdat.c
https://raw.githubusercontent.com/maxilham01/Dasar-pemograman/8c7c124/gabut/Strukdat.c
maxilham01/Dasar-pemograman 8c7c124 gabut/Strukdat.c
true
200
1,208
#include <stdio.h> #include <stdlib.h> #include <string.h> #define MAX_N 10005 int N; int front, rear; int queue[MAX_N]; void push_front(int x) { if (front == 0) { front = MAX_N - 1; queue[front] = x; } else { front--; queue[front] = x; } } void push_back(int x) { que...
4
tirth-125/C-code
4c310fb
Reversedigit.c
C
www.github.com/tirth-125/C-code/tree/main/Reversedigit.c
https://raw.githubusercontent.com/tirth-125/C-code/4c310fb/Reversedigit.c
tirth-125/C-code 4c310fb Reversedigit.c
true
200
422
#include<stdio.h> int main(int argc, char const *argv[]) { int num,remainder,rev=0; printf("enter the num = "); scanf("%d",&num); while (num!=0) { remainder = num%10; rev = rev*10 + remainder; num/=10; //(num=num/10) } printf("Reverse number=%d...
1
shield02/alx-low_level_programming
90cadf8
0x0C-more_malloc_free/2-calloc.c
C
www.github.com/shield02/alx-low_level_programming/tree/main/0x0C-more_malloc_free/2-calloc.c
https://raw.githubusercontent.com/shield02/alx-low_level_programming/90cadf8/0x0C-more_malloc_free/2-calloc.c
shield02/alx-low_level_programming 90cadf8 0x0C-more_malloc_free/2-calloc.c
true
200
500
#include "main.h" #include <stdlib.h> /** * *_calloc - allocates memory for an array * @nmemb: unsigned int variable * @size: unsigned int variable * * Description: this function allocates memory for an array * Return: void */ void *_calloc(unsigned int nmemb, unsigned int size) { unsigned int i = 0; char *ch...
6
YahyaZE/alx-low_level_programming
487345c
0x13-more_singly_linked_lists/0-print_listint.c
C
www.github.com/YahyaZE/alx-low_level_programming/tree/main/0x13-more_singly_linked_lists/0-print_listint.c
https://raw.githubusercontent.com/YahyaZE/alx-low_level_programming/487345c/0x13-more_singly_linked_lists/0-print_listint.c
YahyaZE/alx-low_level_programming 487345c 0x13-more_singly_linked_lists/0-print_listint.c
true
200
375
#include "lists.h" #include <stdlib.h> #include <string.h> #include <stdio.h> /** * print_listint - prints all the elements of a listint_t list. * @h: linked list of type listint_t to print * Return: the number of nodes */ size_t print_listint(const listint_t *h) { size_t node = 0; while (h) { printf("%d\n"...
0
Rufidatul726/OperatingSystem
7b46d2d
Semaphore.c
C
www.github.com/Rufidatul726/OperatingSystem/tree/main/Semaphore.c
https://raw.githubusercontent.com/Rufidatul726/OperatingSystem/7b46d2d/Semaphore.c
Rufidatul726/OperatingSystem 7b46d2d Semaphore.c
true
200
601
//semaphore #include < stdio.h> #include < pthread.h> #include < semaphore.h> #include < unistd.h> sem_t mutex; void* thread(void* arg) { //wait sem_wait(&mutex); printf("\nEntered thread\n"); //critical section sleep(4); //signal printf("\n Exit thread\n"); sem_post(&...
2