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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
mgcarofano/Esercitazioni-PDC | 5eb7185 | prova1/codice/menu.c | C | www.github.com/mgcarofano/Esercitazioni-PDC/tree/main/prova1/codice/menu.c | https://raw.githubusercontent.com/mgcarofano/Esercitazioni-PDC/5eb7185/prova1/codice/menu.c | mgcarofano/Esercitazioni-PDC 5eb7185 prova1/codice/menu.c | true | 200 | 4,762 | /*
menu.c
di Mario Gabriele Carofano
e Francesco Noviello
*/
/* **************************************************************************** */
// LIBRERIE
#include "./libraries/menufunc.h"
/* **************************************************************************** */
int main(int argc, char **argv) {
/*... | 2 |
weka/netxtreme-bnxt_en | 34b810f | bnxt_en_v230/bnxt_log_data.h | C | www.github.com/weka/netxtreme-bnxt_en/tree/main/bnxt_en_v230/bnxt_log_data.h | https://raw.githubusercontent.com/weka/netxtreme-bnxt_en/34b810f/bnxt_en_v230/bnxt_log_data.h | weka/netxtreme-bnxt_en 34b810f bnxt_en_v230/bnxt_log_data.h | true | 200 | 449 | /* Broadcom NetXtreme-C/E network driver.
*
* Copyright (c) 2023 Broadcom Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation.
*/
#ifndef BNXT_LOG_DATA_H
#define BNXT_LOG_DATA_H
#defi... | 5 |
21A91A05J1/codemind-c | f87de7f | happy_number.c | C | www.github.com/21A91A05J1/codemind-c/tree/main/happy_number.c | https://raw.githubusercontent.com/21A91A05J1/codemind-c/f87de7f/happy_number.c | 21A91A05J1/codemind-c f87de7f happy_number.c | true | 200 | 407 | #include<stdio.h>
int sum(int);
int sum(int a)
{
int s=0;
while(a>0)
{
s+=((a%10)*(a%10));
a/=10;
}
return s;
}
int main()
{
int n,k=0;
scanf("%d",&n);
if(n<10)
{
n=n*n;
}
while(n>=10)
{
k=sum(n);
n=k;
}
if(k==1 || k==7)
... | 3 |
NullifyDev/Asciigine | f20f39a | src/init.c | C | www.github.com/NullifyDev/Asciigine/tree/main/src/init.c | https://raw.githubusercontent.com/NullifyDev/Asciigine/f20f39a/src/init.c | NullifyDev/Asciigine f20f39a src/init.c | true | 200 | 1,024 | #include "init.h"
void init()
{
im = input_init(60, 8);
lm = layermgr_init(3, 40, 20);
layermgr_add(lm, 0, new_layer(40, 20, 0, 0, file_read("/home/saturn/Asciigine/src/maps/test", 800)));
layermgr_add(lm, 2, new_layer(1, 1, 5, 5, "@"));
layermgr_add(lm, 1, new_layer(1, 1, 36, 3, "X"));
im->keylist = keylist_s... | 0 |
AswinSatheesh/Placement-trainning-RTC | 2c4a7fc | Cprogramming/July21/fibanacci.c | C | www.github.com/AswinSatheesh/Placement-trainning-RTC/tree/main/Cprogramming/July21/fibanacci.c | https://raw.githubusercontent.com/AswinSatheesh/Placement-trainning-RTC/2c4a7fc/Cprogramming/July21/fibanacci.c | AswinSatheesh/Placement-trainning-RTC 2c4a7fc Cprogramming/July21/fibanacci.c | true | 200 | 299 | #include<stdio.h>
int main(){
int num;
printf("Enter the num:\n");
scanf("%d",&num);
int a = 0;
int b = 1;
int result = 0;
printf("%d ",a);
while(num > 0){
result = a + b;
a = b;
b = result;
printf("%d ",result);
num--;
}
} | 1 |
MdRufsan/Structurred_programming | 61d80b0 | Basic/code7.c | C | www.github.com/MdRufsan/Structurred_programming/tree/main/Basic/code7.c | https://raw.githubusercontent.com/MdRufsan/Structurred_programming/61d80b0/Basic/code7.c | MdRufsan/Structurred_programming 61d80b0 Basic/code7.c | true | 200 | 491 | #include<stdio.h>
int main()
{
double a,b,addition,substraction,multiply,division;
printf("Enter the value of a:");
scanf("%lf",&a);
printf("Enter the value of b:");
scanf("%lf",&b);
addition=a+b;
substraction=a-b;
multiply=a*b;
division=a/b;
printf("Value of Addition=%.2lf\n",addition);
pri... | 4 |
Padifu03/c_k-r_exercises | 6072638 | Capitulo 1/2_conversion_fah_cel.c | C | www.github.com/Padifu03/c_k-r_exercises/tree/main/Capitulo 1/2_conversion_fah_cel.c | https://raw.githubusercontent.com/Padifu03/c_k-r_exercises/6072638/Capitulo%201/2_conversion_fah_cel.c | Padifu03/c_k-r_exercises 6072638 Capitulo 1/2_conversion_fah_cel.c | true | 200 | 1,020 | /*
CURSO C LIBRO KERNIGHAN & RITCHIE
Programa de conversión de Fahrenheit a Celsius
capitulo 1: variables, expresiones e iteraciones
*/
#include <stdio.h>
// imprime la tabla de F-C para fahr = 20,..., 300
int main()
{
int upper = 300; /* Límite superior de la tabla de temperaturas */
int lower... | 2 |
kg4687/HackerRank-Problems---Apr-2023-CCC-SRM-KTR---Cintel-CPS-01-Phase-II---Coding-Practice | 6008ba6 | B 112 : Goto and Label.c | C | www.github.com/kg4687/HackerRank-Problems---Apr-2023-CCC-SRM-KTR---Cintel-CPS-01-Phase-II---Coding-Practice/tree/main/B 112 : Goto and Label.c | https://raw.githubusercontent.com/kg4687/HackerRank-Problems---Apr-2023-CCC-SRM-KTR---Cintel-CPS-01-Phase-II---Coding-Practice/6008ba6/B%20112%20%3A%20Goto%20and%20Label.c | kg4687/HackerRank-Problems---Apr-2023-CCC-SRM-KTR---Cintel-CPS-01-Phase-II---Coding-Practice 6008ba6 B 112 : Goto and Label.c | true | 200 | 205 | #include <stdio.h>
int main()
{
int num;
scanf("%d", &num);
while (num > 0)
{
if (num % 2 == 1) goto label;
printf("%d ", num);
num = num/2;
}
label : printf("Process Complete");
return 0;
}
| 5 |
swastik2525/Assignment6_23MM02012 | bd6a4ac | Assignment6_Q4_23MM02012.c | C | www.github.com/swastik2525/Assignment6_23MM02012/tree/main/Assignment6_Q4_23MM02012.c | https://raw.githubusercontent.com/swastik2525/Assignment6_23MM02012/bd6a4ac/Assignment6_Q4_23MM02012.c | swastik2525/Assignment6_23MM02012 bd6a4ac Assignment6_Q4_23MM02012.c | true | 200 | 1,086 | #include <stdio.h>
void main()
{
int m, n;
printf("\nEnter the size of v1[m] = ");
scanf("%d", &m);
printf("\nEnter the size of v2[n] = ");
scanf("%d", &n);
int v1[m], v2[n];
printf("enter v1");
for (int i = 0; i < m; i++)
{
scanf("%d", &v1[i]);
}
... | 0 |
KeshavAbhishek/CLanguage | 1e7453c | 03-05-2023_1.c | C | www.github.com/KeshavAbhishek/CLanguage/tree/main/03-05-2023_1.c | https://raw.githubusercontent.com/KeshavAbhishek/CLanguage/1e7453c/03-05-2023_1.c | KeshavAbhishek/CLanguage 1e7453c 03-05-2023_1.c | true | 200 | 558 | #include <stdio.h>
// #include <string.h>
int main(){
char value[1000];
printf("Enter a string (no white space) : ");
scanf("%s", &value);
int flag = 0;
int k=0;
while (value[k]!='\0'){k += 1;}
for (int i = 0; i < k; i++)
{
if(value[k-i-1]==value[i]){
print... | 3 |
pliduino/aurora-interpreter | 435ac13 | src/main.c | C | www.github.com/pliduino/aurora-interpreter/tree/main/src/main.c | https://raw.githubusercontent.com/pliduino/aurora-interpreter/435ac13/src/main.c | pliduino/aurora-interpreter 435ac13 src/main.c | true | 200 | 2,502 | #include <malloc.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include "program/program.h"
int main(int argc, char const *argv[])
{
static const char usestr[] = "[-v verbose][-s strict][-c compile][-x execute][-t transpile]\n"
"Other options: \n"
... | 4 |
RVU-BSC-CSDSDE-2022/activity-sets-ishitaaa2004 | 6623d6a | set02/problem07.c | C | www.github.com/RVU-BSC-CSDSDE-2022/activity-sets-ishitaaa2004/tree/main/set02/problem07.c | https://raw.githubusercontent.com/RVU-BSC-CSDSDE-2022/activity-sets-ishitaaa2004/6623d6a/set02/problem07.c | RVU-BSC-CSDSDE-2022/activity-sets-ishitaaa2004 6623d6a set02/problem07.c | true | 200 | 1,251 | #include <stdio.h>
struct triangle{
float base, height, area;
};
typedef struct triangle tri;
int input()
{
int a;
printf("enter the number of triangles for which area should be calculated");
scanf("%d", &a);
return a;
}
tri input_triangle()
{
tri a;
printf("enter the base");
scanf("%f",&a. base);
printf("e... | 6 |
zxuu/BITReexamination | 7e3056a | other/ZhengShuHe.c | C | www.github.com/zxuu/BITReexamination/tree/main/other/ZhengShuHe.c | https://raw.githubusercontent.com/zxuu/BITReexamination/7e3056a/other/ZhengShuHe.c | zxuu/BITReexamination 7e3056a other/ZhengShuHe.c | true | 200 | 916 | //
// Created by zxuu on 2020/1/3.
//
/*
* 整数和
* 编写程序,读入一个整数N。若N为非负数,则计算N 到2N 之间的整数和;若N为一个负数,则求2N 到N 之间的整数和。
*
* 输入描述:
* 第一行表示样例数m,接下来m行每行一个整数N,N的绝对值不超过100。
* 输出描述:
* 输出m行,每行表示对应的题目所求。
*
* 示例
* 输入:
* 2
* 2
* -1
* 输出:
* 9
* -3
*/
#include <stdio.h>
#include <math.h>
int func(int x){
int sum = 0;
... | 2 |
jnkUHaFnir/human-vs-ai | acd396c | 3-3_gpt-4-1106/gpt4-1106_198.c | C | www.github.com/jnkUHaFnir/human-vs-ai/tree/main/3-3_gpt-4-1106/gpt4-1106_198.c | https://raw.githubusercontent.com/jnkUHaFnir/human-vs-ai/acd396c/3-3_gpt-4-1106/gpt4-1106_198.c | jnkUHaFnir/human-vs-ai acd396c 3-3_gpt-4-1106/gpt4-1106_198.c | true | 200 | 610 | #include <stdint.h>
typedef uint32_t UINT32;
UINT32 GetIP(const char *p)
{
register UINT32 dwIP = 0, dwIP_Part = 0;
while (true)
{
UINT32 val = *p;
if(val == 0)
{
return (dwIP << 8) | dwIP_Part;
}
else if(val == '.')
{
dwIP = ... | 7 |
caioalvesbraga/EstruturaDeDados1 | fab812b | Rose/x.c | C | www.github.com/caioalvesbraga/EstruturaDeDados1/tree/main/Rose/x.c | https://raw.githubusercontent.com/caioalvesbraga/EstruturaDeDados1/fab812b/Rose/x.c | caioalvesbraga/EstruturaDeDados1 fab812b Rose/x.c | true | 200 | 1,149 | #include <stdio.h>
#include <string.h>
int main() {
char letra;
char texto[1001];
int palavras_com_letra = 0;
int num_palavras = 0;
scanf("%c\n", &letra);
fgets(texto, 1001, stdin);
// Percorre o texto e conta o número de palavras que contêm a letra de interesse
int len = strlen(texto... | 1 |
kevreco/ac | 07f09ac | cb/cb_assert.h | C | www.github.com/kevreco/ac/tree/main/cb/cb_assert.h | https://raw.githubusercontent.com/kevreco/ac/07f09ac/cb/cb_assert.h | kevreco/ac 07f09ac cb/cb_assert.h | true | 200 | 1,754 | #ifndef CB_ASSERT_H
#define CB_ASSERT_H
#ifdef __cplusplus
extern "C" {
#endif
#define cb_assert_int_equals(expected, expression) \
do { \
int result = (expression); \
if (result != expected) { \
cb_log_error("Result '%d' is not equal to the expected value '%d' : %s %d", result, expected, __FILE__, __LINE__);... | 5 |
Reginald-kyalo/alx-low_level_programming | a40d970 | 0x0C-more_malloc_free/3-array_range.c | C | www.github.com/Reginald-kyalo/alx-low_level_programming/tree/main/0x0C-more_malloc_free/3-array_range.c | https://raw.githubusercontent.com/Reginald-kyalo/alx-low_level_programming/a40d970/0x0C-more_malloc_free/3-array_range.c | Reginald-kyalo/alx-low_level_programming a40d970 0x0C-more_malloc_free/3-array_range.c | true | 200 | 496 | #include "main.h"
#include <stdlib.h>
/**
* array_range - creates array of numbers starting
* from min to max
* @min: starting point
* @max: end point
*
* Return: pointer to array if successful
* NULL on failure
*/
int *array_range(int min, int max)
{
int i = 0, *array, size;
if (min > max)
return (NULL)... | 0 |
AnkiGilbertOkosso/alx-higher_level_programming | 77086e8 | 0x01-python-if_else_loops_functions/13-insert_number.c | C | www.github.com/AnkiGilbertOkosso/alx-higher_level_programming/tree/main/0x01-python-if_else_loops_functions/13-insert_number.c | https://raw.githubusercontent.com/AnkiGilbertOkosso/alx-higher_level_programming/77086e8/0x01-python-if_else_loops_functions/13-insert_number.c | AnkiGilbertOkosso/alx-higher_level_programming 77086e8 0x01-python-if_else_loops_functions/13-insert_number.c | true | 200 | 1,152 | #include <stdlib.h>
#include "lists.h"
/**
* insert_node - Inserts a number into a sorted singly linked list.
*
* @head: Double pointer to a singly linked list
*
* @number: Value of the new node.
*
* Return: The address of the new node, or NULL if it failed.
*/
listint_t *insert_node(listint_t **head, int numb... | 3 |
yayamayaya/onegin | 45d283a | src/include/string_reader.h | C | www.github.com/yayamayaya/onegin/tree/main/src/include/string_reader.h | https://raw.githubusercontent.com/yayamayaya/onegin/45d283a/src/include/string_reader.h | yayamayaya/onegin 45d283a src/include/string_reader.h | true | 200 | 380 | #ifndef STR_READ
#define STR_READ
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include "wchar.h"
#include "log.h"
typedef struct string {
wchar_t *str_ptr;
int str_len;
} string_t;
enum STR_READ_ERRS
{
ONLY_ONE_STR = 1818,
STR_ARR_MEM_ALC_ERR,
};
int read_strings(string_t **strs, int ... | 4 |
Sojworld/alx-low_level_programming | 10cc07f | 0x04-more_functions_nested_loops/3-print_numbers.c | C | www.github.com/Sojworld/alx-low_level_programming/tree/main/0x04-more_functions_nested_loops/3-print_numbers.c | https://raw.githubusercontent.com/Sojworld/alx-low_level_programming/10cc07f/0x04-more_functions_nested_loops/3-print_numbers.c | Sojworld/alx-low_level_programming 10cc07f 0x04-more_functions_nested_loops/3-print_numbers.c | true | 200 | 237 | #include <stdio.h>
#include "main.h"
/**
* print_numbers - function that print all numbers from 0 to 9
*
* Return: returns void
*/
void print_numbers(void)
{
int n;
for (n = 48; n < 58; n++)
{
putchar(n);
}
putchar(10);
}
| 6 |
alperyasar/GTU-Homeworks | 0042e72 | System Programming/hw2/covarianceMatrix.c | C | www.github.com/alperyasar/GTU-Homeworks/tree/main/System Programming/hw2/covarianceMatrix.c | https://raw.githubusercontent.com/alperyasar/GTU-Homeworks/0042e72/System%20Programming/hw2/covarianceMatrix.c | alperyasar/GTU-Homeworks 0042e72 System Programming/hw2/covarianceMatrix.c | true | 200 | 2,639 | #include "hdr.h"
int calculateCov(int mean,int k);
int calculateCov1(int mean1,int mean2,int k,int l);
int main(int argc, char *argv[]){
int x=0,y=0,z=0,i=0,outputFd;
struct flock fl1,fl2;
char **ep;
int matrix[9];
char buf[12] = {0};
// char buf[4] = {0};
// file locks
// sigset_t origMask, blockMask... | 2 |
TIxtex/libftprintf | 57c3ca2 | sources/printf.c | C | www.github.com/TIxtex/libftprintf/tree/main/sources/printf.c | https://raw.githubusercontent.com/TIxtex/libftprintf/57c3ca2/sources/printf.c | TIxtex/libftprintf 57c3ca2 sources/printf.c | true | 200 | 2,654 | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* printf.c :+: :+: :+: ... | 1 |
realme-kernel-opensource/realme_GT5-AndroidU-vendor-source | 9ba5d80 | vendor/qcom/opensource/wlan/qcacld-3.0/core/mac/src/pe/lim/lim_process_sme_req_messages.c | C | www.github.com/realme-kernel-opensource/realme_GT5-AndroidU-vendor-source/tree/main/vendor/qcom/opensource/wlan/qcacld-3.0/core/mac/src/pe/lim/lim_process_sme_req_messages.c | https://raw.githubusercontent.com/realme-kernel-opensource/realme_GT5-AndroidU-vendor-source/9ba5d80/vendor/qcom/opensource/wlan/qcacld-3.0/core/mac/src/pe/lim/lim_process_sme_req_messages.c | realme-kernel-opensource/realme_GT5-AndroidU-vendor-source 9ba5d80 vendor/qcom/opensource/wlan/qcacld-3.0/core/mac/src/pe/lim/lim_process_sme_req_messages.c | true | 200 | 152,041 | /*
* Copyright (c) 2012-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
* above copyright ... | 5 |
Sharim0684/CPP_OPP_DSA | a1b150a | c prograaming assignment no=14/5.c | C | www.github.com/Sharim0684/CPP_OPP_DSA/tree/main/c prograaming assignment no=14/5.c | https://raw.githubusercontent.com/Sharim0684/CPP_OPP_DSA/a1b150a/c%20prograaming%20assignment%20no%3D14/5.c | Sharim0684/CPP_OPP_DSA a1b150a c prograaming assignment no=14/5.c | true | 200 | 511 | /* Write a program to find the smallest number stored in an array of size 10. Take array
values from the user */
#include<stdio.h>
int main()
{
int a[10];
int smallest;
printf("Enter a number ");
for (int i = 0; i <=9 ; i++)
{
scanf("%d",&a[i]);
}
smallest = a[0];
f... | 0 |
Sappy2409/SimpleBashUtils | 17e3ceb | C3_SimpleBashUtils-2-develop/src/cat/s21_cat.c | C | www.github.com/Sappy2409/SimpleBashUtils/tree/main/C3_SimpleBashUtils-2-develop/src/cat/s21_cat.c | https://raw.githubusercontent.com/Sappy2409/SimpleBashUtils/17e3ceb/C3_SimpleBashUtils-2-develop/src/cat/s21_cat.c | Sappy2409/SimpleBashUtils 17e3ceb C3_SimpleBashUtils-2-develop/src/cat/s21_cat.c | true | 200 | 2,554 | #include "s21_cat.h"
int main(int argc, char *argv[]) {
struct flags flags = {0, 0, 0, 0, 0, 0};
if (argc == 1) {
int s = 4096;
int c;
while (s--) {
c = getchar();
putchar(c);
}
} else
while (optind < argc) {
cat(argc, argv, &flags);
++optind;
}
return 0;
}
void... | 4 |
Lolitron-0/os-course | 18fbfe3 | 4/05-3.c | C | www.github.com/Lolitron-0/os-course/tree/main/4/05-3.c | https://raw.githubusercontent.com/Lolitron-0/os-course/18fbfe3/4/05-3.c | Lolitron-0/os-course 18fbfe3 4/05-3.c | true | 200 | 1,562 | #include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>
int main() {
int fd[2], result;
size_t size;
if (pipe(fd) < 0) {
printf("Can\'t open pipe\n");
exit(-1);
}
fcntl(fd[1], fcntl(fd[1], F_SETFL, fcntl(fd[1], F_GETFL) | O_NONBLOCK));
result = fork(... | 2 |
AGULUZADA9/cs_lab | 93212d3 | 2ex4.c | C | www.github.com/AGULUZADA9/cs_lab/tree/main/2ex4.c | https://raw.githubusercontent.com/AGULUZADA9/cs_lab/93212d3/2ex4.c | AGULUZADA9/cs_lab 93212d3 2ex4.c | true | 200 | 361 |
#include <stdio.h>
int main() {
int n;
float number, sum = 0.0;
scanf("%d", &n);
while (n>0) {
printf("Enter a floating-point number: ");
scanf("%f", &number);
sum += number;
n--;
}
printf("The sum of the numbers... | 6 |
MrPurple666/FRLG-Plus_featured | 06f9cc0 | src/key_system_menu.c | C | www.github.com/MrPurple666/FRLG-Plus_featured/tree/main/src/key_system_menu.c | https://raw.githubusercontent.com/MrPurple666/FRLG-Plus_featured/06f9cc0/src/key_system_menu.c | MrPurple666/FRLG-Plus_featured 06f9cc0 src/key_system_menu.c | true | 200 | 36,183 | #include "global.h"
#include "gflib.h"
#include "scanline_effect.h"
#include "text_window_graphics.h"
#include "main_menu.h"
#include "menu.h"
#include "task.h"
#include "overworld.h"
#include "help_system.h"
#include "text_window.h"
#include "strings.h"
#include "field_fadetransition.h"
#include "gba/m4a_internal.h"
... | 3 |
zhengyang92/loops | bfcabb6 | srcs/7294.c | C | www.github.com/zhengyang92/loops/tree/main/srcs/7294.c | https://raw.githubusercontent.com/zhengyang92/loops/bfcabb6/srcs/7294.c | zhengyang92/loops bfcabb6 srcs/7294.c | true | 200 | 501 | #include <stdint.h>
#include <stdio.h>
typedef __int64_t int64_t;
typedef __uint32_t uint32_t;
int
fn (int bbase, int i, int needAlpha, int gbase, int64_t cy, int rbase,
uint32_t * y_table32, int abase, int64_t yb)
{
for (i = 0; i < 1024; i++)
{
unsigned yval = av_clip_uint8_c ((yb + 0x8000) >> 16)... | 1 |
Salifabu/alx-low_level_programming | 447db87 | 0x18-dynamic_libraries/4-strpbrk.c | C | www.github.com/Salifabu/alx-low_level_programming/tree/main/0x18-dynamic_libraries/4-strpbrk.c | https://raw.githubusercontent.com/Salifabu/alx-low_level_programming/447db87/0x18-dynamic_libraries/4-strpbrk.c | Salifabu/alx-low_level_programming 447db87 0x18-dynamic_libraries/4-strpbrk.c | true | 200 | 359 | #include "main.h"
/**
* _strpbrk - main function of the prototype
*
* @s: function parameter
*
* @accept: Fuunction parameter
*
* Return: Always 0.
*/
char *_strpbrk(char *s, char *accept)
{
int a, b;
for (a = 0; s[a] != '\0'; a++)
{
for (b = 0; accept[b] != '\0'; b++)
{
if (s[a] == accept[b]... | 7 |
Juyoung4/iot-raspberrypi | 0bf5775 | sensor_hw4/PIR/pir_main.c | C | www.github.com/Juyoung4/iot-raspberrypi/tree/main/sensor_hw4/PIR/pir_main.c | https://raw.githubusercontent.com/Juyoung4/iot-raspberrypi/0bf5775/sensor_hw4/PIR/pir_main.c | Juyoung4/iot-raspberrypi 0bf5775 sensor_hw4/PIR/pir_main.c | true | 200 | 481 | #include <stdio.h>
#include <stdlib.h>
#include <wiringPi.h>
#include <unistd.h>
#define PIR_D 7
char pir_flag=0;
void PIR_interrupt()
{
pir_flag=1;
}
int main(void)
{
if(wiringPiSetup()==-1)
return -1;
pinMode(PIR_D,INPUT);
wiringPiISR(PIR_D, INT_EDGE_RISING, PIR_interrupt);
while(1)
{
if(pir_flag==1)
... | 5 |
Viktor0505/TAREAS_DE_PROGRAMACION | e78a15f | PROGRAMAS EN C/PROGRAMAS CAP 2/programa 2.8 .c | C | www.github.com/Viktor0505/TAREAS_DE_PROGRAMACION/tree/main/PROGRAMAS EN C/PROGRAMAS CAP 2/programa 2.8 .c | https://raw.githubusercontent.com/Viktor0505/TAREAS_DE_PROGRAMACION/e78a15f/PROGRAMAS%20EN%20C/PROGRAMAS%20CAP%202/programa%202.8%20.c | Viktor0505/TAREAS_DE_PROGRAMACION e78a15f PROGRAMAS EN C/PROGRAMAS CAP 2/programa 2.8 .c | true | 200 | 1,023 | #include <stdio.h>
/* asistentes.
el programa, al recibir como datos la matricula, la carrera , el semestre
y el promedio de un alumno de una universidad privada, determina si
este puede ser asistente de su carrera
MAT, CAR y SEM: variables de tipo entero.
PRO: variable de tipo real. */
void main(void)
{
int MAT,... | 0 |
HoSanKwon/dryer_project | f742818 | dryer/Core/Src/fnd_controller.c | C | www.github.com/HoSanKwon/dryer_project/tree/main/dryer/Core/Src/fnd_controller.c | https://raw.githubusercontent.com/HoSanKwon/dryer_project/f742818/dryer/Core/Src/fnd_controller.c | HoSanKwon/dryer_project f742818 dryer/Core/Src/fnd_controller.c | true | 200 | 4,049 | #include "fnd_controller.h"
uint8_t _LED_0F[29];
static SPI_HandleTypeDef * m_hspi;
void init_fnd(SPI_HandleTypeDef * hspi) {
_LED_0F[0] = 0xC0; //0
_LED_0F[1] = 0xF9; //1
_LED_0F[2] = 0xA4; //2
_LED_0F[3] = 0xB0; //3
_LED_0F[4] = 0x99; //4
_LED_0F[5] = 0x92; //5
_LED_0F[6] = 0x82; //6
_LED_0F[7] = 0xF8; //7
... | 4 |
ArthurNamutilu/alx-low_level_programming | c585f9d | 0x13-more_singly_linked_lists/103-find_loop.c | C | www.github.com/ArthurNamutilu/alx-low_level_programming/tree/main/0x13-more_singly_linked_lists/103-find_loop.c | https://raw.githubusercontent.com/ArthurNamutilu/alx-low_level_programming/c585f9d/0x13-more_singly_linked_lists/103-find_loop.c | ArthurNamutilu/alx-low_level_programming c585f9d 0x13-more_singly_linked_lists/103-find_loop.c | true | 200 | 551 | #include "lists.h"
/**
* find_listint_loop - function that finds the loop in linked list
* @head: linked list being searched
*
* Return: The address of the starting loop node || NULL
*/
listint_t *find_listint_loop(listint_t *head)
{
listint_t *sl = head;
listint_t *fst = head;
if (!head)
{
return (NULL... | 2 |
Mikalach/holbertonschool-low_level_programming | 9dede9d | pointers_arrays_strings/6-puts2.c | C | www.github.com/Mikalach/holbertonschool-low_level_programming/tree/main/pointers_arrays_strings/6-puts2.c | https://raw.githubusercontent.com/Mikalach/holbertonschool-low_level_programming/9dede9d/pointers_arrays_strings/6-puts2.c | Mikalach/holbertonschool-low_level_programming 9dede9d pointers_arrays_strings/6-puts2.c | true | 200 | 263 | #include "main.h"
/**
* puts2 - print every other character starting from the 1st
* @str: given string
* Return: 0
*/
void puts2(char *str)
{
int i;
for (i = 0; str[i] != '\0'; i++)
{
if (i % 2 == 0)
{
_putchar(str[i]);
}
}
_putchar('\n');
}
| 6 |
nguyengiabaoptit/nguyengiabao_KSENG24A_lap-trinh-c_Session-15 | dd7a9e5 | bài 9/Untitled6.c | C | www.github.com/nguyengiabaoptit/nguyengiabao_KSENG24A_lap-trinh-c_Session-15/tree/main/bài 9/Untitled6.c | https://raw.githubusercontent.com/nguyengiabaoptit/nguyengiabao_KSENG24A_lap-trinh-c_Session-15/dd7a9e5/b%C3%A0i%209/Untitled6.c | nguyengiabaoptit/nguyengiabao_KSENG24A_lap-trinh-c_Session-15 dd7a9e5 bài 9/Untitled6.c | true | 200 | 468 | #include <stdio.h>
#include <string.h>
int main() {
char str[100], ch;
int i, j = 0;
strcpy(str, "hello world");
printf("Chuoi ban dau la: %s\n", str);
printf("moi nhap ki tu can xoa: ");
scanf("%c", &ch);
for(i = 0; i < strlen(str); i++) {
if(str[i] != ch) {
... | 3 |
EcaterinaMihaela/C_Workspace | 1ad53a4 | isUpper/main.c | C | www.github.com/EcaterinaMihaela/C_Workspace/tree/main/isUpper/main.c | https://raw.githubusercontent.com/EcaterinaMihaela/C_Workspace/1ad53a4/isUpper/main.c | EcaterinaMihaela/C_Workspace 1ad53a4 isUpper/main.c | true | 200 | 2,755 | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
void citireSir(char string[50][50], int nrCuv)
{
for(int i=0; i<nrCuv; i++)
{
printf("cuvant %d: ", i+1);
scanf("%s", string[i]);
}
}
void afisareSir(char string[50][50], int nrCuv)
{
printf("Si... | 1 |
LavitSaini/C-Programming-Language | 8152bab | C Problems/Prime.c | C | www.github.com/LavitSaini/C-Programming-Language/tree/main/C Problems/Prime.c | https://raw.githubusercontent.com/LavitSaini/C-Programming-Language/8152bab/C%20Problems/Prime.c | LavitSaini/C-Programming-Language 8152bab C Problems/Prime.c | true | 200 | 359 | #include <stdio.h>
int main()
{
int n;
int count=0;
printf("Enter a Number:");
scanf("%d", &n);
for (int i=1; i<=n; i++)
{
if (n%i==0)
{
count++;
}
}
if (count==2)
{
printf("Prime Number \n");
}
else
{
printf("Not a P... | 5 |
DOHUN256/C | 6d8c071 | 2024-11-12/test6.c | C | www.github.com/DOHUN256/C/tree/main/2024-11-12/test6.c | https://raw.githubusercontent.com/DOHUN256/C/6d8c071/2024-11-12/test6.c | DOHUN256/C 6d8c071 2024-11-12/test6.c | true | 200 | 286 | #include <stdio.h>
int main() {
char first;
char second;
printf("�� ���� ���ĺ��� �Է��� �ּ���: ");
scanf("%c %c",&first,&second);
int sum = (int)first - (int)second;
int distance = abs(sum);
printf("%c�� %c ������ �Ÿ�: %d",first,second,distance);
return 0;
} | 7 |
wyatt8740/misc-c-tools | 7e7b2de | checksum-mt32.c | C | www.github.com/wyatt8740/misc-c-tools/tree/main/checksum-mt32.c | https://raw.githubusercontent.com/wyatt8740/misc-c-tools/7e7b2de/checksum-mt32.c | wyatt8740/misc-c-tools 7e7b2de checksum-mt32.c | true | 200 | 931 | #include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <inttypes.h>
uint32_t calcsum();
int main(int argc, char **argv)
{
uint32_t sum=calcsum();
printf("%x\n",(uint8_t)sum);
fprintf(stderr,"%x (decimal: %lu)\n",(uint8_t)sum,(uint8_t)sum);
return 0;
}
uint32_t calcsum() {
uint32_t sum=0;
uin... | 0 |
k-srivastava/psuc | b44d019 | Lecture 7/Q4.c | C | www.github.com/k-srivastava/psuc/tree/main/Lecture 7/Q4.c | https://raw.githubusercontent.com/k-srivastava/psuc/b44d019/Lecture%207/Q4.c | k-srivastava/psuc b44d019 Lecture 7/Q4.c | true | 200 | 564 | /*
Find out prime number using while loop.
*/
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
bool is_prime(int32_t number)
{
if (number <= 1) { return false; }
uint32_t i = 2;
while (i < number)
{
if (number % i == 0) { return false; }
i++;
}
return true;
... | 6 |
flaviosrms/Solutions-Beecrowd | 69713b6 | Solutions/C/1010.c | C | www.github.com/flaviosrms/Solutions-Beecrowd/tree/main/Solutions/C/1010.c | https://raw.githubusercontent.com/flaviosrms/Solutions-Beecrowd/69713b6/Solutions/C/1010.c | flaviosrms/Solutions-Beecrowd 69713b6 Solutions/C/1010.c | true | 200 | 301 | #include <stdio.h>
int main (){
int c[2], n[2];
float v[2];
for(int i=0; i<2; i++){
scanf("%d", &c[i]);
scanf("%d", &n[i]);
scanf("%f", &v[i]);
}
float t = (n[0]*v[0]) + (n[1]*v[1]);
printf("VALOR A PAGAR: R$ %.2f\n", t);
return 0;
}
| 3 |
torsten-rupp/bar | 1d53656 | bar/common/dictionaries.c | C | www.github.com/torsten-rupp/bar/tree/main/bar/common/dictionaries.c | https://raw.githubusercontent.com/torsten-rupp/bar/1d53656/bar/common/dictionaries.c | torsten-rupp/bar 1d53656 bar/common/dictionaries.c | true | 200 | 45,932 | /***********************************************************************\
*
* Contents: dictionary functions
* Systems: all
*
\***********************************************************************/
#define __DICTIONARY_IMPLEMENTATION__
/****************************** Includes *******************************/
#inclu... | 2 |
lakshya1216/DS-LAB | 8f74f80 | 5th-lab-program.c | C | www.github.com/lakshya1216/DS-LAB/tree/main/5th-lab-program.c | https://raw.githubusercontent.com/lakshya1216/DS-LAB/8f74f80/5th-lab-program.c | lakshya1216/DS-LAB 8f74f80 5th-lab-program.c | true | 200 | 4,332 | #include <stdio.h>
#include <stdlib.h>
struct Node {
int data;
struct Node* next;
};
struct Node* first = NULL;
struct Node* getNode(int data) {
struct Node* newNode = (struct Node*)malloc(sizeof(struct Node));
newNode->data = data;
newNode->next = NULL;
return newNode;
}
vo... | 1 |
Kushal-Dev94/Kushal_Assignments | c6fccd5 | OS_Lab/Reader_Writer/rdw.c | C | www.github.com/Kushal-Dev94/Kushal_Assignments/tree/main/OS_Lab/Reader_Writer/rdw.c | https://raw.githubusercontent.com/Kushal-Dev94/Kushal_Assignments/c6fccd5/OS_Lab/Reader_Writer/rdw.c | Kushal-Dev94/Kushal_Assignments c6fccd5 OS_Lab/Reader_Writer/rdw.c | true | 200 | 1,487 | #include<stdio.h>
#include<unistd.h>
#include<pthread.h>
#include<semaphore.h>
#include<stdlib.h>
pthread_mutex_t rwmutex;
pthread_mutex_t lock;
int rdcnt,nr,nw;
pthread_t thread;
void *reader(void *arg);
void *writer(void *arg);
void init();
void main()
{
int i;
init();
printf("\nEnter no of readers ");
scanf("%d"... | 4 |
m-ila/cub3D | 8de2834 | mandatory/srcs/game/game_ray_math.c | C | www.github.com/m-ila/cub3D/tree/main/mandatory/srcs/game/game_ray_math.c | https://raw.githubusercontent.com/m-ila/cub3D/8de2834/mandatory/srcs/game/game_ray_math.c | m-ila/cub3D 8de2834 mandatory/srcs/game/game_ray_math.c | true | 200 | 2,585 | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* game_ray_math.c :+: :+: :+: ... | 7 |
13dmcculloch/stellsim | cc9c2b1 | src/distribution.c | C | www.github.com/13dmcculloch/stellsim/tree/main/src/distribution.c | https://raw.githubusercontent.com/13dmcculloch/stellsim/cc9c2b1/src/distribution.c | 13dmcculloch/stellsim cc9c2b1 src/distribution.c | true | 200 | 1,288 | /* Normal distributions.
*
* Douglas McCulloch, September 2023
*/
#include "distribution.h"
int normal_distribution(double *z0, double *z1)
{
/* Box-Muller transform is easy. Needn't be fast. */
double u1 = rand() / (float) RAND_MAX;
double u2 = rand() / (float) RAND_MAX;
double R2 = -2 * log(u1);... | 5 |
brianneconaway/ComputerOrganization | 07b930a | CS220Spring23_bncona21/Homework/hw1/sequence.c | C | www.github.com/brianneconaway/ComputerOrganization/tree/main/CS220Spring23_bncona21/Homework/hw1/sequence.c | https://raw.githubusercontent.com/brianneconaway/ComputerOrganization/07b930a/CS220Spring23_bncona21/Homework/hw1/sequence.c | brianneconaway/ComputerOrganization 07b930a CS220Spring23_bncona21/Homework/hw1/sequence.c | true | 200 | 198 | #include <stdio.h>
int sequence(int n){
int count = 0;
while (n > 1){
if (n % 2 == 0){
n = n/2;
}
else if (n % 2 != 0){
n = (3*n+1);
}
count = count + 1;
}
return count;
}
| 0 |
ModouLaminJagne/alx-low_level_programming | 7ede009 | 0x02-functions_nested_loops/103-fibonacci.c | C | www.github.com/ModouLaminJagne/alx-low_level_programming/tree/main/0x02-functions_nested_loops/103-fibonacci.c | https://raw.githubusercontent.com/ModouLaminJagne/alx-low_level_programming/7ede009/0x02-functions_nested_loops/103-fibonacci.c | ModouLaminJagne/alx-low_level_programming 7ede009 0x02-functions_nested_loops/103-fibonacci.c | true | 200 | 319 | #include <stdio.h>
/**
* main - prints the first 50 Fibonacci numbers, starting with 1 and 2
* Return: always 0
*/
int main(void)
{
long j = 1, k = 2, sum = 0;
int temp;
while (k <= 4000000)
{
if (k % 2 == 0)
{
sum += k;
}
temp = k;
k = j + k;
j = temp;
}
printf("%ld\n", sum);
return (0);
}
| 6 |
KULeuven-Diepenbeek/osc-course | 19aba01 | archive_jo/c_ll/main2.c | C | www.github.com/KULeuven-Diepenbeek/osc-course/tree/main/archive_jo/c_ll/main2.c | https://raw.githubusercontent.com/KULeuven-Diepenbeek/osc-course/19aba01/archive_jo/c_ll/main2.c | KULeuven-Diepenbeek/osc-course 19aba01 archive_jo/c_ll/main2.c | true | 200 | 1,090 | #include <stdio.h>
#include <stdlib.h> /* to use malloc */
typedef struct node {
char value;
struct node * next;
} T_node;
void showLL(T_node **a) {
T_node * pointer;
pointer = *a;
if (pointer == NULL) {
printf("the LL is empty\n");
} else {
printf ("values: ");
while (pointer != NULL) {
... | 4 |
Mcjayoap/alx-low_level_programming | 8dba595 | 0x13-more_singly_linked_lists/10-delete_nodeint.c | C | www.github.com/Mcjayoap/alx-low_level_programming/tree/main/0x13-more_singly_linked_lists/10-delete_nodeint.c | https://raw.githubusercontent.com/Mcjayoap/alx-low_level_programming/8dba595/0x13-more_singly_linked_lists/10-delete_nodeint.c | Mcjayoap/alx-low_level_programming 8dba595 0x13-more_singly_linked_lists/10-delete_nodeint.c | true | 200 | 678 | #include "lists.h"
/**
* delete_nodeint_at_index - deletes the node at index
* index of a listint_t linked list.
* @head: pointer tp the newNode
* @index: index of the node that should be deleted
* Return: 1 if succeeded
* otherwise return -1
*/
int delete_nodeint_at_index(listint_t **head, unsigned int index)
... | 3 |
Varshiiiiiiiiiiiiiiiiiii/CSA0331-DS- | b4bb5f6 | countevenodd.c | C | www.github.com/Varshiiiiiiiiiiiiiiiiiii/CSA0331-DS-/tree/main/countevenodd.c | https://raw.githubusercontent.com/Varshiiiiiiiiiiiiiiiiiii/CSA0331-DS-/b4bb5f6/countevenodd.c | Varshiiiiiiiiiiiiiiiiiii/CSA0331-DS- b4bb5f6 countevenodd.c | true | 200 | 552 | #include<stdio.h>
#define N 10
int main()
{
int a[N],i,even=0,odd=0;
printf("Enter %d integer numbers\n",N);
for(i=0;i<N;i++)
scanf("%d",&a[i]);
printf("\n\nEven numbers in the array are:\n");
for(i=0;i<N;i++)
{
if(a[i]%2==0)
{
printf("%d\n",a[i]);
even++;
}
}
printf("\nOdd numbers... | 1 |
bian2022/grapeos | 7410b0c | kernel/src/mouse.c | C | www.github.com/bian2022/grapeos/tree/main/kernel/src/mouse.c | https://raw.githubusercontent.com/bian2022/grapeos/7410b0c/kernel/src/mouse.c | bian2022/grapeos 7410b0c kernel/src/mouse.c | true | 200 | 4,496 | #include "common.h"
#define KEYCMD_SENDTO_MOUSE 0xd4 //向鼠标发送命令
#define MOUSECMD_ENABLE 0xf4 //允许鼠标设备发送数据包
int mousedata0;
int last_mouse_event; //记录最近一次鼠标事件
int double_click_phase; //取值0~3,left_down1、left_up1、left_down2、left_up2,0表示初始未开始或归位状态。
unsigned int left_down_time1;
unsigned int left_down_time2;
int is_r... | 5 |
Kingroba/alx-low_level_programming | 60c5a0c | 0x01-variables_if_else_while/100-print_comb3.c | C | www.github.com/Kingroba/alx-low_level_programming/tree/main/0x01-variables_if_else_while/100-print_comb3.c | https://raw.githubusercontent.com/Kingroba/alx-low_level_programming/60c5a0c/0x01-variables_if_else_while/100-print_comb3.c | Kingroba/alx-low_level_programming 60c5a0c 0x01-variables_if_else_while/100-print_comb3.c | true | 200 | 928 | #include <stdio.h>
#include <stdlib.h>
/**
* main - main block
* Description: Write a program that prints all possible
* different combination of two digits
* Numbers must be separated by ,, followed by a space
* the two digits must be diffrent
* 01 and 10 are considerd the same combination of the two digits 0 an... | 0 |
AbdelrahmanWael2/socket-programming | c3d3c0e | Socket_Programming/server/server.c | C | www.github.com/AbdelrahmanWael2/socket-programming/tree/main/Socket_Programming/server/server.c | https://raw.githubusercontent.com/AbdelrahmanWael2/socket-programming/c3d3c0e/Socket_Programming/server/server.c | AbdelrahmanWael2/socket-programming c3d3c0e Socket_Programming/server/server.c | true | 200 | 7,347 | /**
* @file server.c
* @brief Server implementation
* @authors Abdelrahman Wael, Ahmed Hesham
* @date 2023-12-01
*
* This file contains the implementation of a simple server program
* using sockets. Mulithreading is used for fast communication and creation
* and synchronized with mutex locks
*/
#include <s... | 6 |
VoKhoi1305/C-language | d951ac6 | phonebook.c | C | www.github.com/VoKhoi1305/C-language/tree/main/phonebook.c | https://raw.githubusercontent.com/VoKhoi1305/C-language/d951ac6/phonebook.c | VoKhoi1305/C-language d951ac6 phonebook.c | true | 200 | 1,585 | #include<stdio.h>
#include<stdlib.h>
#include<string.h>
typedef struct Node{
char name[20];
char tel[20];
char email[32];
struct Node* next;
} Node_t;
Node_t* makeNode(char name[], char tel[], char email[]) {
Node_t* newNode = (Node_t*)malloc(sizeof(Node_t));
if (newNode == NULL) return NULL;
strcpy(ne... | 1 |
dijkstracula/macewan-cache | 4b0e89b | sharing.c | C | www.github.com/dijkstracula/macewan-cache/tree/main/sharing.c | https://raw.githubusercontent.com/dijkstracula/macewan-cache/4b0e89b/sharing.c | dijkstracula/macewan-cache 4b0e89b sharing.c | true | 200 | 2,788 | /* This program demonstrates the effects of cacheline-level contention on a
* multi-threaded program. Each thread modifies an independent index in a
* shared array; however, because multiple `int` values can fit on a single
* cacheline, the hardware cache coherence protocol has to keep invalidating
* the other CPU... | 4 |
fastice/speckleSource | cbf41ca | Cullst/cullSTData.c | C | www.github.com/fastice/speckleSource/tree/main/Cullst/cullSTData.c | https://raw.githubusercontent.com/fastice/speckleSource/cbf41ca/Cullst/cullSTData.c | fastice/speckleSource cbf41ca Cullst/cullSTData.c | true | 200 | 4,768 | #include "stdio.h"
#include "string.h"
#include "clib/standard.h"
#include "gdalIO/gdalIO/grimpgdal.h"
#include "cullst.h"
#include "math.h"
#include "stdlib.h"
#include "mosaicSource/common/common.h"
#define NARROWREGION 4
static float selectForCull(uint32_t k, uint32_t n, float arr[]);
void cullSTData(CullParams *c... | 7 |
nimaaskarian/color | 3158724 | as-rgb.c | C | www.github.com/nimaaskarian/color/tree/main/as-rgb.c | https://raw.githubusercontent.com/nimaaskarian/color/3158724/as-rgb.c | nimaaskarian/color 3158724 as-rgb.c | true | 200 | 313 | #include <stdlib.h>
#include <stdio.h>
#include "color.h"
void print_color_rgb(Color color)
{
printf("%d,%d,%d\n", color.r,color.g,color.b);
}
int main(int argc, char *argv[])
{
if (argc < 2) {
return EXIT_FAILURE;
}
Color c;
get_color(&c, argv[1]);
print_color_rgb(c);
return EXIT_SUCCESS;
}
| 3 |
lienle042024/cup | a753a9e | cups/cups/pwg-media.c | C | www.github.com/lienle042024/cup/tree/main/cups/cups/pwg-media.c | https://raw.githubusercontent.com/lienle042024/cup/a753a9e/cups/cups/pwg-media.c | lienle042024/cup a753a9e cups/cups/pwg-media.c | true | 200 | 40,523 | /*
* PWG media name API implementation for CUPS.
*
* Copyright 2009-2019 by Apple Inc.
*
* Licensed under Apache License v2.0. See the file "LICENSE" for more
* information.
*/
/*
* Include necessary headers...
*/
#include "cups-private.h"
#include "debug-internal.h"
#include <math.h>
/*
* Local macros...... | 2 |
nachovanzo7/holbertonschool-low_level_programming | e020f75 | pointers_arrays_strings/3-main.c | C | www.github.com/nachovanzo7/holbertonschool-low_level_programming/tree/main/pointers_arrays_strings/3-main.c | https://raw.githubusercontent.com/nachovanzo7/holbertonschool-low_level_programming/e020f75/pointers_arrays_strings/3-main.c | nachovanzo7/holbertonschool-low_level_programming e020f75 pointers_arrays_strings/3-main.c | true | 200 | 715 | #include "main.h"
#include <stdio.h>
/**
* main - check the code
*
* Return: Always 0.
*/
/*int main(void)
{
char *str;
str = "I do not fear computers. I fear the lack of them - Isaac Asimov";
_puts(str);
return (0);
}*/
/**
* main - check the code
*
* Return: Always 0.
*/
/*int main(void)
{
... | 5 |
ssmiraa16/string.h | 816765e | src/s21_string/s21_insert.c | C | www.github.com/ssmiraa16/string.h/tree/main/src/s21_string/s21_insert.c | https://raw.githubusercontent.com/ssmiraa16/string.h/816765e/src/s21_string/s21_insert.c | ssmiraa16/string.h 816765e src/s21_string/s21_insert.c | true | 200 | 695 | #include "../s21_string.h"
void *s21_insert(const char *src, const char *str, s21_size_t start_index) {
if (!src || !str) return s21_NULL;
s21_size_t str_len = s21_strlen(str);
s21_size_t len_src = (s21_strlen(src) + str_len) + 1;
char *start = s21_NULL;
char *new_str = (char *)malloc(len_src);
if (new_st... | 0 |
UsefElbedwehy/Embedded-basic-diploma | c60aa5b | 03-HAL/03-CLCD/CLCD_Program.c | C | www.github.com/UsefElbedwehy/Embedded-basic-diploma/tree/main/03-HAL/03-CLCD/CLCD_Program.c | https://raw.githubusercontent.com/UsefElbedwehy/Embedded-basic-diploma/c60aa5b/03-HAL/03-CLCD/CLCD_Program.c | UsefElbedwehy/Embedded-basic-diploma c60aa5b 03-HAL/03-CLCD/CLCD_Program.c | true | 200 | 2,617 | #include "STDTYPES.h"
#include <util/delay.h>
#include "DIO_Interface.h"
#include "DIO_Private.h"
#include "CLCD_Config.h"
#include "CLCD_Private.h"
#include "CLCD_Interface.h"
void CLCD_VoidInit(void)
{
DIO_VoidSetPortDirection(CLCD_DATA_PORT,DIO_u8PORT_OUTPUT);
DIO_VoidSetPinDirection(CLCD_CTRL_PORT,CLCD_RS,DIO_u... | 1 |
ZhuWuyin/Employee-Management-System | 25859fe | Employee-Management-System/Time.c | C | www.github.com/ZhuWuyin/Employee-Management-System/tree/main/Employee-Management-System/Time.c | https://raw.githubusercontent.com/ZhuWuyin/Employee-Management-System/25859fe/Employee-Management-System/Time.c | ZhuWuyin/Employee-Management-System 25859fe Employee-Management-System/Time.c | true | 200 | 1,182 | // A type of time
typedef struct time {
unsigned char hour;
unsigned char minute;
unsigned char second;
} Time;
/**
* @brief Convert a Time type to a formatted string
*
* @param t A data of Time type
* @return char* -> The formatted string
*/
char* timeToStr(Time t){
char* hour=intT... | 3 |
codinasion-archive/codinasion-programme | 6653841 | programme/volume-of-cuboid/volume-of-cuboid.c | C | www.github.com/codinasion-archive/codinasion-programme/tree/main/programme/volume-of-cuboid/volume-of-cuboid.c | https://raw.githubusercontent.com/codinasion-archive/codinasion-programme/6653841/programme/volume-of-cuboid/volume-of-cuboid.c | codinasion-archive/codinasion-programme 6653841 programme/volume-of-cuboid/volume-of-cuboid.c | true | 200 | 486 | // Write a programme to find volume of a cuboid
#include <stdio.h>
int main()
{
int length, width, height, Volume;
// Input
printf("Enter the length of cuboid : ");
scanf("%d", &length);
printf("Enter the width of cuboid : ");
scanf("%d", &width);
printf("Enter the height of cuboid : ");... | 4 |
Keaton-Clark/FinalProject | 205e718 | src/sevenseg.c | C | www.github.com/Keaton-Clark/FinalProject/tree/main/src/sevenseg.c | https://raw.githubusercontent.com/Keaton-Clark/FinalProject/205e718/src/sevenseg.c | Keaton-Clark/FinalProject 205e718 src/sevenseg.c | true | 200 | 1,265 | #include "sevenseg.h"
uint8_t seven_seg_lookup[10][7] = {
[0] = {0, 1, 1, 1, 1, 1, 1},
[1] = {0, 1, 0, 0, 0, 1, 0},
[2] = {1, 0, 1, 1, 0, 1, 1},
[3] = {1, 1, 1, 0, 0, 1, 1},
[4] = {1, 1, 0, 0, 1, 1, 0},
[5] = {1, 1, 1, 0, 1, 0, 1},
[6] = {1, 1, 1, 1, 1, 0, 0},
[7] = {0, 1, 0, 0, 0, 1, 1},
[8] = {1, 1, 1, 1, 1... | 2 |
Cimeries11421/Philosopher | 02efbb3 | philo/src/wait_for_task.c | C | www.github.com/Cimeries11421/Philosopher/tree/main/philo/src/wait_for_task.c | https://raw.githubusercontent.com/Cimeries11421/Philosopher/02efbb3/philo/src/wait_for_task.c | Cimeries11421/Philosopher 02efbb3 philo/src/wait_for_task.c | true | 200 | 3,479 | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* wait_for_task.c :+: :+: :+: ... | 7 |
bernardobiondini/UFOP | d370b19 | primeiro-periodo/Tutorias/tut2.c | C | www.github.com/bernardobiondini/UFOP/tree/main/primeiro-periodo/Tutorias/tut2.c | https://raw.githubusercontent.com/bernardobiondini/UFOP/d370b19/primeiro-periodo/Tutorias/tut2.c | bernardobiondini/UFOP d370b19 primeiro-periodo/Tutorias/tut2.c | true | 200 | 389 | #include <stdio.h>
int main(){
int x, n, N[100];
scanf("%d", &x);
FILE *arquivo = fopen("arq.dat", "rb");
fread(&n, sizeof(int), 1, arquivo);
fread(N, sizeof(int), n, arquivo);
fclose(arquivo);
int cont = 0;
for (int i = 0; i < n; i++){
if (N[i] == x) cont++;
}
... | 5 |
you30119/CProj | 4fcabe4 | CProj/operator2.c | C | www.github.com/you30119/CProj/tree/main/CProj/operator2.c | https://raw.githubusercontent.com/you30119/CProj/4fcabe4/CProj/operator2.c | you30119/CProj 4fcabe4 CProj/operator2.c | true | 200 | 339 | #include <stdio.h>
int main7() {
// ������
// 1. ���Կ����� =
// �����ʿ� �ִ� ������ ���� ���ʿ� �ִ� ������ ��´�.
int num1;
num1 = 3;
int num2 = 4; // ����� ���ÿ� ��뵵 ���� (�ʱ�ȭ)
num1 = num2; // ����(num1) : ����, ������(num2) : ��
num1 = num1; // ������ num1�� �������� num1�� �ٸ�
// num1 = 4;
return ... | 0 |
mohit121188/DSA-through-C | 65523aa | SINGLY LINKED LIST/Program 2.c | C | www.github.com/mohit121188/DSA-through-C/tree/main/SINGLY LINKED LIST/Program 2.c | https://raw.githubusercontent.com/mohit121188/DSA-through-C/65523aa/SINGLY%20LINKED%20LIST/Program%202.c | mohit121188/DSA-through-C 65523aa SINGLY LINKED LIST/Program 2.c | true | 200 | 5,359 | //implementing stack using singly linked list.
#include<stdio.h>
#include<stdlib.h>
//defining structure for node
struct node
{
int data;
struct node *next;
};
typedef struct node node;
//defining structure for stack
struct stack
{
node *tos;
};
typedef struct stack stack;
//prototype declarations of the f... | 6 |
analogdevicesinc/precision-converters-library | 2f5a50d | fft/adi_fft.c | C | www.github.com/analogdevicesinc/precision-converters-library/tree/main/fft/adi_fft.c | https://raw.githubusercontent.com/analogdevicesinc/precision-converters-library/2f5a50d/fft/adi_fft.c | analogdevicesinc/precision-converters-library 2f5a50d fft/adi_fft.c | true | 200 | 20,264 | /***************************************************************************//**
* @file adi_fft.c
* @brief FFT library implementation
********************************************************************************
* Copyright (c) 2023 Analog Devices, Inc.
*
* This software is proprietary to Analog Devic... | 1 |
vinackylee/TCADer | d123119 | sim_test/memcpy_cpu.c | C | www.github.com/vinackylee/TCADer/tree/main/sim_test/memcpy_cpu.c | https://raw.githubusercontent.com/vinackylee/TCADer/d123119/sim_test/memcpy_cpu.c | vinackylee/TCADer d123119 sim_test/memcpy_cpu.c | true | 200 | 628 | #include<stdio.h>
#include "rocc.h"
#include "aes16k.h"
#include "rocc.h"
#include "encoding.h"
#define SIZE 1024 * 16
unsigned long addr = randNum;
__attribute__((aligned(512))) char destNum[SIZE];
int main()
{
printf("*************\n");
long a,r1,r2,r3,res1,res2,res3;
int i;
res1 = rdcycle();
memcpy(destNum, ra... | 3 |
yangmingchaoyang/gittest | f607f4c | 63_QBE/decl.c | C | www.github.com/yangmingchaoyang/gittest/tree/main/63_QBE/decl.c | https://raw.githubusercontent.com/yangmingchaoyang/gittest/f607f4c/63_QBE/decl.c | yangmingchaoyang/gittest f607f4c 63_QBE/decl.c | true | 200 | 40,364 | #include "defs.h"
#include "data.h"
#include "decl.h"
// Parsing of declarations
// Copyright (c) 2019 Warren Toomey, GPL3
static struct symtable *composite_declaration(int type);
static int typedef_declaration(struct symtable **ctype);
static int type_of_typedef(char *name, struct symtable **ctype);
static void enum... | 4 |
cdricw3l/petri_network | eb1aafc | network/ptri_destroy_network.c | C | www.github.com/cdricw3l/petri_network/tree/main/network/ptri_destroy_network.c | https://raw.githubusercontent.com/cdricw3l/petri_network/eb1aafc/network/ptri_destroy_network.c | cdricw3l/petri_network eb1aafc network/ptri_destroy_network.c | true | 200 | 2,765 | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ptri_destroy_network.c :+: :+: :+: ... | 2 |
niravkagathara/Semester-1 | b234738 | C-language/lab9a/table.c | C | www.github.com/niravkagathara/Semester-1/tree/main/C-language/lab9a/table.c | https://raw.githubusercontent.com/niravkagathara/Semester-1/b234738/C-language/lab9a/table.c | niravkagathara/Semester-1 b234738 C-language/lab9a/table.c | true | 200 | 272 | //Print multiplication table of a given number.
#include<stdio.h>
int main()
{
int i=1,n,sum=0;
printf("enter n:");
scanf("\n%d",&n);
while (i<=10)
{
/* code */
sum=n*i;
printf("\n%d*%d=%d",n,i,n*i);
i++;
}
}
| 7 |
17998384/arithmetic | 1bbc460 | leetcode/int_to_roman.c | C | www.github.com/17998384/arithmetic/tree/main/leetcode/int_to_roman.c | https://raw.githubusercontent.com/17998384/arithmetic/1bbc460/leetcode/int_to_roman.c | 17998384/arithmetic 1bbc460 leetcode/int_to_roman.c | true | 200 | 1,875 | //
// int_to_roman.c
// arithmetic
// 12.整数转罗马数字
// Created by 我叫城北徐公° on 2020/9/14.
// Copyright © 2020 alex. All rights reserved.
//
#include <stdio.h>
#include <stdlib.h>
void four_and_nine_handler(char* str,int* bit_point,int num,char a,char b,char c)
{
if (num == 4)
{
str[(*bit_point)++] =... | 5 |
MarwanAshraf03/alx-low_level_programming | 6e305ae | 0x0A-argc_argv/0-whatsmyname.c | C | www.github.com/MarwanAshraf03/alx-low_level_programming/tree/main/0x0A-argc_argv/0-whatsmyname.c | https://raw.githubusercontent.com/MarwanAshraf03/alx-low_level_programming/6e305ae/0x0A-argc_argv/0-whatsmyname.c | MarwanAshraf03/alx-low_level_programming 6e305ae 0x0A-argc_argv/0-whatsmyname.c | true | 200 | 275 | #include "main.h"
#include <stdio.h>
/**
* main - entry point of the code
* @argc: the number of array of arguments
* @argv: array of pointers to arguments
*
* Return: Always 0
*/
int main(int argc, char *argv[])
{
if (argc)
printf("%s\n", argv[0]);
return (0);
}
| 0 |
raxmonov1210/git-tutorial | 3222f64 | .vscode/formula4.c | C | www.github.com/raxmonov1210/git-tutorial/tree/main/.vscode/formula4.c | https://raw.githubusercontent.com/raxmonov1210/git-tutorial/3222f64/.vscode/formula4.c | raxmonov1210/git-tutorial 3222f64 .vscode/formula4.c | true | 200 | 338 | #include <stdio.h>
#include <math.h>
// scanf va printf operatoridan foydalanganda
// int uchun %d
// double %lf
// float uchun %f
// sqrt sonning ildizini topish uchun ishlatiladi
// D=9.8*a^2+5.52*cos(t^2)
int main() {
double a=3, t=40, D;
D=9.8*pow(a, 2)+5.52*cos(pow(t, 2));
printf("natija: %lf\n", D ... | 6 |
ishandutta2007/codeforces-c | fab5d29 | cyand1317/normal/540/A.c | C | www.github.com/ishandutta2007/codeforces-c/tree/main/cyand1317/normal/540/A.c | https://raw.githubusercontent.com/ishandutta2007/codeforces-c/fab5d29/cyand1317/normal/540/A.c | ishandutta2007/codeforces-c fab5d29 cyand1317/normal/540/A.c | true | 200 | 402 | #include <stdio.h>
#define MAXN 1096
#define min(_a, _b) ((_a) < (_b) ? (_a) : (_b))
int main()
{
int n, i, t, d[MAXN], ans = 0;
scanf("%d", &n); getchar();
for (i = 0; i < n; ++i) d[i] = getchar() - '0';
getchar();
for (i = 0; i < n; ++i) {
t = getchar() - '0';
ans += min((t - d[i]... | 3 |
aszswaz/demo | 3b4caa2 | programming-language/c/socket/unix-tcp-client.c | C | www.github.com/aszswaz/demo/tree/main/programming-language/c/socket/unix-tcp-client.c | https://raw.githubusercontent.com/aszswaz/demo/3b4caa2/programming-language/c/socket/unix-tcp-client.c | aszswaz/demo 3b4caa2 programming-language/c/socket/unix-tcp-client.c | true | 200 | 1,056 | #include <errno.h>
#include <stdlib.h>
#include <stdio.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <sys/un.h>
#include <unistd.h>
#define SOCKET_PATH "test.sock"
#define SYSCALL_ERROR(expression) \
if (expression) { \
printf("%s %d: %s\n", __FILE_NAME__, __LINE__, strerror(errno)); \
... | 1 |
yunm5/20242387_Dune | ebda558 | 20242387_Dune/display.c | C | www.github.com/yunm5/20242387_Dune/tree/main/20242387_Dune/display.c | https://raw.githubusercontent.com/yunm5/20242387_Dune/ebda558/20242387_Dune/display.c | yunm5/20242387_Dune ebda558 20242387_Dune/display.c | true | 200 | 5,253 | /*
* display.c:
* ȭ�鿡 ���� ������ ���
* ��, Ŀ��, �ý��� ����, ����â, �ڿ� ���� ���
* io.c�� �ִ� �Լ����� �����
*/
#include "display.h"
#include "io.h"
// ����� ������� �»��(topleft) ��ǥ
const POSITION resource_pos = { 0, 0 };
const POSITION map_pos = { 1, 0 };
const POSITION message_pos = { 19, 0 }; // �ý��� ���� ǥ��... | 4 |
adeshdatir99ad/Assignment-in-C | 2144deb | Assignment 19/1.c | C | www.github.com/adeshdatir99ad/Assignment-in-C/tree/main/Assignment 19/1.c | https://raw.githubusercontent.com/adeshdatir99ad/Assignment-in-C/2144deb/Assignment%2019/1.c | adeshdatir99ad/Assignment-in-C 2144deb Assignment 19/1.c | true | 200 | 615 | // 1. Write a program to find the number of vowels in each of the 5 strings stored in two
// dimensional arrays, taken from the user.
#include<stdio.h>
int main()
{
char a[5][20];
int i,j,vowel=0;
printf("Enter a String: ");
for (i=0;i<=4;i++)
{
gets(a[i]);
}
for (i=... | 2 |
r4nd3l/revived_remix_mini_pc | 5d12632 | drivers/video/zynqmp/zynqmp_dpsub.c | C | www.github.com/r4nd3l/revived_remix_mini_pc/tree/main/drivers/video/zynqmp/zynqmp_dpsub.c | https://raw.githubusercontent.com/r4nd3l/revived_remix_mini_pc/5d12632/drivers/video/zynqmp/zynqmp_dpsub.c | r4nd3l/revived_remix_mini_pc 5d12632 drivers/video/zynqmp/zynqmp_dpsub.c | true | 200 | 55,315 | // SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2021 - 2022, Xilinx Inc.
* Copyright (C) 2022 - 2023, Advanced Micro Devices, Inc.
*
* Xilinx displayport(DP) Tx Subsytem driver
*/
#include <clk.h>
#include <cpu_func.h>
#include <dm.h>
#include <errno.h>
#include <generic-phy.h>
#include <stdlib.h>
#include... | 5 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.