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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
KyleCr4ne/PRAC_MSU_CMC | f6d4bee | 14/1.c | C | www.github.com/KyleCr4ne/PRAC_MSU_CMC/tree/main/14/1.c | https://raw.githubusercontent.com/KyleCr4ne/PRAC_MSU_CMC/f6d4bee/14/1.c | KyleCr4ne/PRAC_MSU_CMC f6d4bee 14/1.c | true | 200 | 536 | #include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <signal.h>
enum
{
LAST_CALL = 5
};
void
handler(int s)
{
static int cnt = 0;
if (cnt < LAST_CALL) {
printf("%d\n", cnt);
fflush(stdout);
cnt++;
} else {
_exit(0);
}
}
_Bool True = 1;
int
main(int ... | 5 |
kunaldeora09/4-apr-SE | d764519 | Assignments_4-apr-SE/Module 3 [C Programming]/Square_cube.c | C | www.github.com/kunaldeora09/4-apr-SE/tree/main/Assignments_4-apr-SE/Module 3 [C Programming]/Square_cube.c | https://raw.githubusercontent.com/kunaldeora09/4-apr-SE/d764519/Assignments_4-apr-SE/Module%203%20%5BC%20Programming%5D/Square_cube.c | kunaldeora09/4-apr-SE d764519 Assignments_4-apr-SE/Module 3 [C Programming]/Square_cube.c | true | 200 | 263 | // 3. Write a program to make a square and cube of number.
#include<stdio.h>
main()
{
int a, square, cube;
printf("Enter a number\n");
scanf("%d", &a);
square= a*a;
cube= a*a*a;
printf("Square:- %d\n", square);
printf("cube:- %d\n", cube);
}
| 0 |
polarfire-soc/polarfire-soc-amp-examples | 99c5e68 | mpfs-rpmsg-bm/src/application/inc/console_demo.c | C | www.github.com/polarfire-soc/polarfire-soc-amp-examples/tree/main/mpfs-rpmsg-bm/src/application/inc/console_demo.c | https://raw.githubusercontent.com/polarfire-soc/polarfire-soc-amp-examples/99c5e68/mpfs-rpmsg-bm/src/application/inc/console_demo.c | polarfire-soc/polarfire-soc-amp-examples 99c5e68 mpfs-rpmsg-bm/src/application/inc/console_demo.c | true | 200 | 5,051 | /*******************************************************************************
* Copyright 2019-2021 Microchip FPGA Embedded Systems Solutions.
*
* SPDX-License-Identifier: MIT
*
* RPMsg console demo
*
* Example application demonstrating how to communicate with another software
* context over the RPMsg bus.
... | 7 |
abhishek-x/network-programming-in-c-language | 15be55e | 09 Broadcasting Using UDP/broadcast_server.c | C | www.github.com/abhishek-x/network-programming-in-c-language/tree/main/09 Broadcasting Using UDP/broadcast_server.c | https://raw.githubusercontent.com/abhishek-x/network-programming-in-c-language/15be55e/09%20Broadcasting%20Using%20UDP/broadcast_server.c | abhishek-x/network-programming-in-c-language 15be55e 09 Broadcasting Using UDP/broadcast_server.c | true | 200 | 1,101 | #include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <netdb.h>
#define PORT 5000
int main() {
int server_socket;
char *msg = "Hello from Server";
struct sockaddr_in broadcast_ad... | 2 |
calmsacibis995/uw2-src | 95995ce | usr/src/common/X11R5/examples/Xol/tutorial/s_composite.c | C | www.github.com/calmsacibis995/uw2-src/tree/main/usr/src/common/X11R5/examples/Xol/tutorial/s_composite.c | https://raw.githubusercontent.com/calmsacibis995/uw2-src/95995ce/usr/src/common/X11R5/examples/Xol/tutorial/s_composite.c | calmsacibis995/uw2-src 95995ce usr/src/common/X11R5/examples/Xol/tutorial/s_composite.c | true | 200 | 1,939 | /* Copyright (c) 1990, 1991, 1992, 1993, 1994 Novell, Inc. All Rights Reserved. */
/* Copyright (c) 1993 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 intended pu... | 3 |
Samuel77743/estrutura-de-dados | f7f5ba2 | Estrutura de Dados/Pilha(STACK)/Pilha Estatica com Interacao de Usuario.c | C | www.github.com/Samuel77743/estrutura-de-dados/tree/main/Estrutura de Dados/Pilha(STACK)/Pilha Estatica com Interacao de Usuario.c | https://raw.githubusercontent.com/Samuel77743/estrutura-de-dados/f7f5ba2/Estrutura%20de%20Dados/Pilha%28STACK%29/Pilha%20Estatica%20com%20Interacao%20de%20Usuario.c | Samuel77743/estrutura-de-dados f7f5ba2 Estrutura de Dados/Pilha(STACK)/Pilha Estatica com Interacao de Usuario.c | true | 200 | 1,771 | //Pilha Estática com painel para usuário
#include <stdio.h>
#include <stdlib.h>
int tam, indice = -1;
void menu(int *pilha) {
printf("\n\n====== EMPILHANDO ======\n");
printf("[1] Empilhar(PUSH)\n");
printf("[2] Retirar do topo(POP)\n");
printf("[3] Imprimir estado atual da pilha");
printf("\n[0] SAIR\n");
... | 4 |
vb-pogribnyi/Glowies | cdbcf70 | app/shaders/host_device.h | C | www.github.com/vb-pogribnyi/Glowies/tree/main/app/shaders/host_device.h | https://raw.githubusercontent.com/vb-pogribnyi/Glowies/cdbcf70/app/shaders/host_device.h | vb-pogribnyi/Glowies cdbcf70 app/shaders/host_device.h | true | 200 | 4,464 | /*
* Copyright (c) 2019-2021, NVIDIA CORPORATION. All rights reserved.
*
* 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 ... | 1 |
mullaarifa/Programs | b7367ac | ass9_2.c | C | www.github.com/mullaarifa/Programs/tree/main/ass9_2.c | https://raw.githubusercontent.com/mullaarifa/Programs/b7367ac/ass9_2.c | mullaarifa/Programs b7367ac ass9_2.c | true | 200 | 992 | //Problem Statment:
//Accept N number from user and return difference between frequency of even numbers and odd numbers.
//Input: N 7
// Elements 85 66 3 80 93 88 90
//Output: 1(4-3)
#include<stdio.h>
#include<stdlib.h>
int Frequency(int Arr[], int iLength)
{
int iCnt = 0;
int iCntEven = 0;
i... | 0 |
Bobsien/CNT143701082023-EletronSystems | c7be605 | ESP32/ReleaseTester/main/mksServo.h | C | www.github.com/Bobsien/CNT143701082023-EletronSystems/tree/main/ESP32/ReleaseTester/main/mksServo.h | https://raw.githubusercontent.com/Bobsien/CNT143701082023-EletronSystems/c7be605/ESP32/ReleaseTester/main/mksServo.h | Bobsien/CNT143701082023-EletronSystems c7be605 ESP32/ReleaseTester/main/mksServo.h | true | 200 | 1,188 | #ifndef __MKS_SERVO_H
#define __MKS_SERVO_H
#include <stdio.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "esp_system.h"
#include <esp_task.h>
#include "esp_log.h"
#include "global.h"
//Definições utilizadas pelo sistema de controle do motor
#define Mst... | 5 |
asing151/Weenix-OS | 1744b1b | kernel/util/printf.c | C | www.github.com/asing151/Weenix-OS/tree/main/kernel/util/printf.c | https://raw.githubusercontent.com/asing151/Weenix-OS/1744b1b/kernel/util/printf.c | asing151/Weenix-OS 1744b1b kernel/util/printf.c | true | 200 | 24,668 | /*
****************************************************************************
* (C) 2003 - Rolf Neugebauer - Intel Research Cambridge
****************************************************************************
*
* File: printf.c
* Author: Rolf Neugebauer (neugebar@dcs.gla.ac.uk)
* Changes: Grz... | 7 |
prots-vita/2Sem1Lab | 2fed6dd | main.c | C | www.github.com/prots-vita/2Sem1Lab/tree/main/main.c | https://raw.githubusercontent.com/prots-vita/2Sem1Lab/2fed6dd/main.c | prots-vita/2Sem1Lab 2fed6dd main.c | true | 200 | 415 | #include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "func.h"
int main(){
// Matrix *mtr = calloc(1, sizeof(Matrix));
Matrix mtr;
if (getMatrix(&mtr)==0){
printf("Try again\n");
return 1;
}
Line mtb;
getMatrixB(&mtb, &mtr);
printf("The original Matrix\n");
printMatrix(&mtr);
printf("The res... | 3 |
Sue609/monty | 76ec692 | add-opcode.c | C | www.github.com/Sue609/monty/tree/main/add-opcode.c | https://raw.githubusercontent.com/Sue609/monty/76ec692/add-opcode.c | Sue609/monty 76ec692 add-opcode.c | true | 200 | 826 | #include "monty.h"
/**
* add - Adds the top elements of the stack.
* @stack: Double pointer to the top of the stack.
* @line_number: Line number of the opcode being executed.
*
* Description: If the stack contains less than two elements, prints an error
* message and exits with EXIT_FAILURE. The result is stored... | 2 |
mgrainger87/GenerativeCompilation | 61c2543 | compilation/problems/34/compilation_unit.c | C | www.github.com/mgrainger87/GenerativeCompilation/tree/main/compilation/problems/34/compilation_unit.c | https://raw.githubusercontent.com/mgrainger87/GenerativeCompilation/61c2543/compilation/problems/34/compilation_unit.c | mgrainger87/GenerativeCompilation 61c2543 compilation/problems/34/compilation_unit.c | true | 200 | 304 |
void customFunction(int int1, int int2, double double1, double double2, int *outInt, double *outDouble) {
if(double2 <= 0) {
*outInt = int1;
*outDouble = double1 + double2;
} else {
customFunction(int1+1, int2-1, double1+0.5, double2-0.5, outInt, outDouble);
}
}
| 4 |
ndsiiecas/NVD-CLONE | 44d93bc | Grammar-Confused Datset/vuln_suited2/CVE_2011_1712_VULN_txXPathNodeUtils__getXSLTId.c | C | www.github.com/ndsiiecas/NVD-CLONE/tree/main/Grammar-Confused Datset/vuln_suited2/CVE_2011_1712_VULN_txXPathNodeUtils__getXSLTId.c | https://raw.githubusercontent.com/ndsiiecas/NVD-CLONE/44d93bc/Grammar-Confused%20Datset/vuln_suited2/CVE_2011_1712_VULN_txXPathNodeUtils__getXSLTId.c | ndsiiecas/NVD-CLONE 44d93bc Grammar-Confused Datset/vuln_suited2/CVE_2011_1712_VULN_txXPathNodeUtils__getXSLTId.c | true | 200 | 634 | nsresult
CVE_2011_1712_VULN_txXPathNodeUtils::getXSLTId(const txXPathNode& aNode,
nsAString& aResult)
{
int calculate_a = 5;
int calculate_b = 0;
calculate_b = 7 * calculate_a + 2;
calculate_a = 3 * calculate_b + 7;
printf("the sum is %d", calculate_a + calculate_b);
if (!aNode.isAttribu... | 1 |
kpatsakis/primevul3 | f35d800 | 67304.c | C | www.github.com/kpatsakis/primevul3/tree/main/67304.c | https://raw.githubusercontent.com/kpatsakis/primevul3/f35d800/67304.c | kpatsakis/primevul3 f35d800 67304.c | true | 200 | 548 | struct page *alloc_pages_current(gfp_t gfp, unsigned order)
{
struct mempolicy *pol = &default_policy;
struct page *page;
if (!in_interrupt() && !(gfp & __GFP_THISNODE))
pol = get_task_policy(current);
/*
* No reference counting needed for current->mempolicy
* nor system default_policy
*/
if (pol->mode =... | 0 |
SK3180/RISHU_DSA | 64a77f3 | dsa6.c | C | www.github.com/SK3180/RISHU_DSA/tree/main/dsa6.c | https://raw.githubusercontent.com/SK3180/RISHU_DSA/64a77f3/dsa6.c | SK3180/RISHU_DSA 64a77f3 dsa6.c | true | 200 | 516 | #include <stdio.h>
int factorial(int n){
if(n == 0){
return 1;
} else {
return n * factorial(n-1);
}
}
int fibbonacci(int n){
if(n ==0){
return 0;
}
else if(n==1){
return 1;
} else {
return (fibbonacci(n-1) + fibbonacci(n-2));
}
}
void main(){
... | 5 |
orlifera/uni | e3655d2 | esc/bruh/bishop.c | C | www.github.com/orlifera/uni/tree/main/esc/bruh/bishop.c | https://raw.githubusercontent.com/orlifera/uni/e3655d2/esc/bruh/bishop.c | orlifera/uni e3655d2 esc/bruh/bishop.c | true | 200 | 1,145 | #include <stdio.h>
#include <stdlib.h>
struct list
{
int val;
struct list *next;
};
typedef struct list L;
L *firstodd(L *l);
L *firstrec(L *l);
void preinsert(L **l, int k);
void print(L *l);
int main()
{
L *l = NULL;
for (int i = 0; i < 7; i++)
{
preinsert(&l, i);
}
for (int i ... | 3 |
thelastmedici/alx-low_level_programming | b84234f | 0x00-hello_world/101-quote.c | C | www.github.com/thelastmedici/alx-low_level_programming/tree/main/0x00-hello_world/101-quote.c | https://raw.githubusercontent.com/thelastmedici/alx-low_level_programming/b84234f/0x00-hello_world/101-quote.c | thelastmedici/alx-low_level_programming b84234f 0x00-hello_world/101-quote.c | true | 200 | 244 | #include <stdio.h>
#include <unistd.h>
/**
* main - prints out the last part of a code in standard error
* Return: 1 if sucess.
*/
int main(void)
{
write(2, "and that piece of art is useful\" - Dora Korpar, 2015-10-19\n", 59);
return (1);
}
| 7 |
Tomcat-42/os-playground | a35efcb | os_practices/1-fork/fork_exercise_a.c | C | www.github.com/Tomcat-42/os-playground/tree/main/os_practices/1-fork/fork_exercise_a.c | https://raw.githubusercontent.com/Tomcat-42/os-playground/a35efcb/os_practices/1-fork/fork_exercise_a.c | Tomcat-42/os-playground a35efcb os_practices/1-fork/fork_exercise_a.c | true | 200 | 531 | #include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
int main(void) {
pid_t child_pid;
child_pid = fork();
for (pid_t i = 0; i < 4; i++) {
switch (child_pid) {
case -1:
perror("fork");
exit(EXIT_FAILURE);
case 0:
printf("I am the ... | 4 |
manishchurnia/Code-Radar-Solutions | 5f285fa | Fibonacci Series@@67ca7acd1fe08d7207c253c6/code.c | C | www.github.com/manishchurnia/Code-Radar-Solutions/tree/main/Fibonacci Series@@67ca7acd1fe08d7207c253c6/code.c | https://raw.githubusercontent.com/manishchurnia/Code-Radar-Solutions/5f285fa/Fibonacci%20Series%40%4067ca7acd1fe08d7207c253c6/code.c | manishchurnia/Code-Radar-Solutions 5f285fa Fibonacci Series@@67ca7acd1fe08d7207c253c6/code.c | true | 200 | 388 | #include <stdio.h>
int main() {
int n;
scanf("%d", &n);
if(n<=0){
printf("Invalid input\n");
return 0;
}
fibonacciSeries(n);
return 0;
}
void fibonacciSeries(int n) {
int a=0, b=1, next;
for(int i=0; i<n; i++){
printf("%d ", a... | 0 |
MiguelAngel456/PUSH_SWAP | aea134e | archive_sort_3.c | C | www.github.com/MiguelAngel456/PUSH_SWAP/tree/main/archive_sort_3.c | https://raw.githubusercontent.com/MiguelAngel456/PUSH_SWAP/aea134e/archive_sort_3.c | MiguelAngel456/PUSH_SWAP aea134e archive_sort_3.c | true | 200 | 2,908 | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* archive_sort_3.c :+: :+: :+: ... | 3 |
gokbeykeskin/C-Server-Client-Model | 22c3bc8 | src/code/queue.c | C | www.github.com/gokbeykeskin/C-Server-Client-Model/tree/main/src/code/queue.c | https://raw.githubusercontent.com/gokbeykeskin/C-Server-Client-Model/22c3bc8/src/code/queue.c | gokbeykeskin/C-Server-Client-Model 22c3bc8 src/code/queue.c | true | 200 | 988 | #include "../headers/queue.h"
#include <stdlib.h>
#include <stdio.h>
//create queue
queue_t *queue_create() {
queue_t *queue = malloc(sizeof(queue_t));
queue->head = NULL;
queue->tail = NULL;
return queue;
}
//destroy queue
void queue_destroy(queue_t *queue) {
while(!queue_empty(queue)) {
dequeue(queue);
}
f... | 7 |
Bophelo22/alx-low_level_programming | 3b536b5 | 0x05-pointers_arrays_strings/5-rev_string.c | C | www.github.com/Bophelo22/alx-low_level_programming/tree/main/0x05-pointers_arrays_strings/5-rev_string.c | https://raw.githubusercontent.com/Bophelo22/alx-low_level_programming/3b536b5/0x05-pointers_arrays_strings/5-rev_string.c | Bophelo22/alx-low_level_programming 3b536b5 0x05-pointers_arrays_strings/5-rev_string.c | true | 200 | 314 | #include "main.h"
/**
* rev_string - function that reverses a string.
* @s: to be used
* Return: void
*/
void rev_string(char *s)
{
int i;
char reverse = s[0];
int count = 0;
while (s[count] != '\0')
{
count++;
}
for (i = 0; i < count; i++)
{
count--;
reverse = s[i];
s[i] = s[count];
s[count] = reverse;
}
}
| 4 |
Davidkc85/alx-low_level_programming | a1af9f9 | 0x05-pointers_arrays_strings/5-rev_string.c | C | www.github.com/Davidkc85/alx-low_level_programming/tree/main/0x05-pointers_arrays_strings/5-rev_string.c | https://raw.githubusercontent.com/Davidkc85/alx-low_level_programming/a1af9f9/0x05-pointers_arrays_strings/5-rev_string.c | Davidkc85/alx-low_level_programming a1af9f9 0x05-pointers_arrays_strings/5-rev_string.c | true | 200 | 431 | #include <stdio.h>
#include "main.h"
/**
* rev_string - This function reverses a string and prints on the stdout
* @s: pointer parameter
* Author: AkutaDavid
*/
void rev_string(char *s)
{
int i, size, half;
char first, last;
i = 0;
while (s[i] ! '\0')
{
i++
}
size = i - 1;
half = size / 2;
while (half ... | 0 |
Abel-alx-github/simple_shell | 6c2934b | first/shell_15_.c | C | www.github.com/Abel-alx-github/simple_shell/tree/main/first/shell_15_.c | https://raw.githubusercontent.com/Abel-alx-github/simple_shell/6c2934b/first/shell_15_.c | Abel-alx-github/simple_shell 6c2934b first/shell_15_.c | true | 200 | 777 | #include "shell.h"
/**
* f_free - to free a pointer of pointer
*@ptrp: pointer of pointer
*/
void f_free(char **ptrp)
{
char **a = ptrp;
if (!ptrp)
return;
while (*ptrp)
free(*ptrp++);
free(a);
}
/**
*re_alloc - re_allocates memory
* @po: pointer to previous malloc'ated
* @oldsize: size of previous blo... | 4 |
caglauzundurukan/doublyLinkedListStudentEnroll | f274887 | main.c | C | www.github.com/caglauzundurukan/doublyLinkedListStudentEnroll/tree/main/main.c | https://raw.githubusercontent.com/caglauzundurukan/doublyLinkedListStudentEnroll/f274887/main.c | caglauzundurukan/doublyLinkedListStudentEnroll f274887 main.c | true | 200 | 3,258 | #include <stdio.h>
#include <stdlib.h>
#include<string.h>
struct ogrenci{
int ogrenci_no;
char ad[40];
char soyad[40];
char bolum[80];
int sinif;
struct ogrenci * next;
struct ogrenci * prev;
};
typedef struct ogrenci node;
node* ekle (node * head){
node * ogr =(node * )malloc(sizeof(... | 0 |
jwillia3/misc-language-experiments | 2031586 | imperative/dynamic-lang/lang.c | C | www.github.com/jwillia3/misc-language-experiments/tree/main/imperative/dynamic-lang/lang.c | https://raw.githubusercontent.com/jwillia3/misc-language-experiments/2031586/imperative/dynamic-lang/lang.c | jwillia3/misc-language-experiments 2031586 imperative/dynamic-lang/lang.c | true | 200 | 30,077 | #define STACK_SIZE 8*1024*1024
#include <ctype.h>
#include <math.h>
#include <setjmp.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define new(T,...) (T*)memcpy(malloc(sizeof(T)), &(T){__VA_ARGS__}, sizeof(T))
#define ast(F,P,...) new(struct ast, .form=F, .pos... | 3 |
mtshwari/alx-low_level_programming | 867f46c | 0x13-more_singly_linked_lists/0-print_listint.c | C | www.github.com/mtshwari/alx-low_level_programming/tree/main/0x13-more_singly_linked_lists/0-print_listint.c | https://raw.githubusercontent.com/mtshwari/alx-low_level_programming/867f46c/0x13-more_singly_linked_lists/0-print_listint.c | mtshwari/alx-low_level_programming 867f46c 0x13-more_singly_linked_lists/0-print_listint.c | true | 200 | 305 | #include "lists.h"
/**
* print_listint - print the elements in the list
* @h: the start of the list
* Return: number of nodes
*/
size_t print_listint(const listint_t *h)
{
unsigned int node_count = 0;
while (h != NULL)
{
printf("%d\n", h->n);
h = h->next;
node_count++;
}
return (node_count);
}
| 7 |
JudithOkumu/alx-low_level_programming | d18728b | 0x04-more_functions_nested_loops/1-isdigit.c | C | www.github.com/JudithOkumu/alx-low_level_programming/tree/main/0x04-more_functions_nested_loops/1-isdigit.c | https://raw.githubusercontent.com/JudithOkumu/alx-low_level_programming/d18728b/0x04-more_functions_nested_loops/1-isdigit.c | JudithOkumu/alx-low_level_programming d18728b 0x04-more_functions_nested_loops/1-isdigit.c | true | 200 | 270 | #include "main.h"
/**
* _isdigit - checks if a character is a digit
*
* @c: The number to be checked
*
* Return: 1 for a character that will be a digit or 0 for any else
*/
int _isdigit(int c)
{
if (c >= 48 && c <= 57)
{
return (1);
}
else
return (0);
}
| 4 |
IrViNg256/MiniProyecto1_Eq7 | 727eec4 | MiniProyecto1_Eq7/MiniProyecto1_Eq7.c | C | www.github.com/IrViNg256/MiniProyecto1_Eq7/tree/main/MiniProyecto1_Eq7/MiniProyecto1_Eq7.c | https://raw.githubusercontent.com/IrViNg256/MiniProyecto1_Eq7/727eec4/MiniProyecto1_Eq7/MiniProyecto1_Eq7.c | IrViNg256/MiniProyecto1_Eq7 727eec4 MiniProyecto1_Eq7/MiniProyecto1_Eq7.c | true | 200 | 6,260 | #include <stdio.h>
#include <conio.h>
#include <string.h>
#include <stdlib.h>
#include <windows.h>
struct contacto
{
char nombre[80];
char genero[8];
long int telefono;
char email[100];
};
void menu();
void obtener(char* nombre);
void iniciar();
void regresar();
void listar();
void agregar();
void bus... | 0 |
pblovs/DAM | f3803a7 | Programacion/EjsClase/Recursividad/ej2.c | C | www.github.com/pblovs/DAM/tree/main/Programacion/EjsClase/Recursividad/ej2.c | https://raw.githubusercontent.com/pblovs/DAM/f3803a7/Programacion/EjsClase/Recursividad/ej2.c | pblovs/DAM f3803a7 Programacion/EjsClase/Recursividad/ej2.c | true | 200 | 483 | #include <stdio.h>
#include <stdlib.h>
int contarPares(int num, int * contador);
int main(){
int contador = 0;
int numero;
printf("Introduce un numero: ");
scanf("%d", &numero);
contarPares(numero, &contador);
printf("Hay %d dígitos pares.\n", contador);
}
int contarPares(int num, int * co... | 7 |
KazeTachinuu/AdventOfTheCode | 14f8364 | 2022/template.c | C | www.github.com/KazeTachinuu/AdventOfTheCode/tree/main/2022/template.c | https://raw.githubusercontent.com/KazeTachinuu/AdventOfTheCode/14f8364/2022/template.c | KazeTachinuu/AdventOfTheCode 14f8364 2022/template.c | true | 200 | 262 | #include <stdio.h>
#include <string.h>
int main(int argc, char *argv[])
{
if (argc != 2) {
printf("Usage: %s <day>\n",argv[0]);
return 1;
}
char input[11] = "inputs/";
strcat(input,argv[1]);
FILE *f = fopen(input,"r");
}
| 4 |
Isoheptane/miscellaneous | 083103b | st7789/st7789.h | C | www.github.com/Isoheptane/miscellaneous/tree/main/st7789/st7789.h | https://raw.githubusercontent.com/Isoheptane/miscellaneous/083103b/st7789/st7789.h | Isoheptane/miscellaneous 083103b st7789/st7789.h | true | 200 | 7,952 | #pragma once
/* =============================
* ST7789 Configuration
* ============================= */
/* Reset Pin */
#define ST7789_RESET_GPIO (GPIOB)
#define ST7789_RESET_PIN (GPIO_PIN_0)
/* D/C Pin */
#define ST7789_DC_GPIO (GPIOB)
#define ST7789_DC_PIN (GPIO_PIN_1)
/* Chip Select */
#define ST7789_CS... | 0 |
Eslamkh/STM32F103C8T6-Firmware | a981e4b | 03-HAL/06-ROTARY_ENCODER/ROTARY_ENCODER_program.c | C | www.github.com/Eslamkh/STM32F103C8T6-Firmware/tree/main/03-HAL/06-ROTARY_ENCODER/ROTARY_ENCODER_program.c | https://raw.githubusercontent.com/Eslamkh/STM32F103C8T6-Firmware/a981e4b/03-HAL/06-ROTARY_ENCODER/ROTARY_ENCODER_program.c | Eslamkh/STM32F103C8T6-Firmware a981e4b 03-HAL/06-ROTARY_ENCODER/ROTARY_ENCODER_program.c | true | 200 | 1,521 | /**********************************************/
/* Author : ... */
/* Date : 2022-02-18 */
/* Version : V01 */
/**********************************************/
#include "STD_TYPES.h"
#include "BIT_MATH.h"
#include "GPIO_interface.h"
... | 3 |
st129699/-2024_Autumn_Std | de1f233 | 2024.10.05_Homework_3/task_4.c | C | www.github.com/st129699/-2024_Autumn_Std/tree/main/2024.10.05_Homework_3/task_4.c | https://raw.githubusercontent.com/st129699/-2024_Autumn_Std/de1f233/2024.10.05_Homework_3/task_4.c | st129699/-2024_Autumn_Std de1f233 2024.10.05_Homework_3/task_4.c | true | 200 | 472 | #include <stdio.h>
#define MAX(a, b) (a) > (b) ? (a) : (b)
int main(void)
{
int n;
int s;
int v;
int max_v1 = 0;
int max_v2 = 0;
int cnt = 0;
scanf_s("%d", &n);
for (int i = 0; i < n; i++)
{
scanf_s("%d %d", &v, &s);
if (s == 0)
continue;
else
{
max_v1 = max_v2;
max_v2 =... | 7 |
pandashaly/fractol | befd944 | src/burning_ship.c | C | www.github.com/pandashaly/fractol/tree/main/src/burning_ship.c | https://raw.githubusercontent.com/pandashaly/fractol/befd944/src/burning_ship.c | pandashaly/fractol befd944 src/burning_ship.c | true | 200 | 1,848 | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* burning_ship.c :+: :+: :+: ... | 6 |
mlaanaiya/Calcul-Parallel | a3a39d2 | BE/03_overmean/overmean.c | C | www.github.com/mlaanaiya/Calcul-Parallel/tree/main/BE/03_overmean/overmean.c | https://raw.githubusercontent.com/mlaanaiya/Calcul-Parallel/a3a39d2/BE/03_overmean/overmean.c | mlaanaiya/Calcul-Parallel a3a39d2 BE/03_overmean/overmean.c | true | 200 | 2,961 | #include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <mpi.h>
int main(int argc, char *argv[])
{
// comment this line, if you want the same vector for each run
srand(time(NULL));
MPI_Init(&argc, &argv);
// Get number of processes
int nb_process;
MPI_Comm_size(MPI_COMM_WORLD, &nb_process);
... | 4 |
Lochmoi/alx-low_level_programming | 0128f6a | 0x0C-more_malloc_free/0-malloc_checked.c | C | www.github.com/Lochmoi/alx-low_level_programming/tree/main/0x0C-more_malloc_free/0-malloc_checked.c | https://raw.githubusercontent.com/Lochmoi/alx-low_level_programming/0128f6a/0x0C-more_malloc_free/0-malloc_checked.c | Lochmoi/alx-low_level_programming 0128f6a 0x0C-more_malloc_free/0-malloc_checked.c | true | 200 | 301 | #include "main.h"
#include <stdlib.h>
/**
* malloc_checked - allocation of memory and terminate with 98
* @b:amount of bytes.
* Return: pointer to the allocated the memory else Return 98.
*/
void *malloc_checked(unsigned int b)
{
int *s;
s = malloc(b);
if (s == NULL)
exit(98);
return (s);
}
| 0 |
So-coder-ai/C-programs | 0c0e8aa | snakegame.c | C | www.github.com/So-coder-ai/C-programs/tree/main/snakegame.c | https://raw.githubusercontent.com/So-coder-ai/C-programs/0c0e8aa/snakegame.c | So-coder-ai/C-programs 0c0e8aa snakegame.c | true | 200 | 1,073 | #include<stdio.h>
#include<stdlib.h>
#include<time.h>
#include<ctype.h>
#define length 10
#define width 20
#define direction 0
typedef struct
{
int x;
int y;
}point;
point snake[100];
point food;
void intialize()
{
//snake
snake[0].x=width/2;
snake[0].y=length/2;
food.x=rand()%w... | 3 |
GendySedysh/Cub3d | 0b5ac7b | utils/sprite_list.c | C | www.github.com/GendySedysh/Cub3d/tree/main/utils/sprite_list.c | https://raw.githubusercontent.com/GendySedysh/Cub3d/0b5ac7b/utils/sprite_list.c | GendySedysh/Cub3d 0b5ac7b utils/sprite_list.c | true | 200 | 1,944 | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* sprite_list.c :+: :+: :+: ... | 7 |
pratikadamas/Object-Oriented-Programming | 308d6b0 | trainproblem.c | C | www.github.com/pratikadamas/Object-Oriented-Programming/tree/main/trainproblem.c | https://raw.githubusercontent.com/pratikadamas/Object-Oriented-Programming/308d6b0/trainproblem.c | pratikadamas/Object-Oriented-Programming 308d6b0 trainproblem.c | true | 200 | 892 | //
// Created by Pratik Giri on 03-10-2024.
//
//A train is moving from Sealdah to Barasat. One of the passengers wants to go Madhayamgram station. After a certain time the train stop at a station. So write a c program to check whether that passenger has reacheded Madayamgram or not.
#include <stdio.h>
#include <strin... | 6 |
sjp-codes/PESU-Hub | 079734f | SEM 3/DSA/DSA Lab/Week 7/priority_queue.c | C | www.github.com/sjp-codes/PESU-Hub/tree/main/SEM 3/DSA/DSA Lab/Week 7/priority_queue.c | https://raw.githubusercontent.com/sjp-codes/PESU-Hub/079734f/SEM%203/DSA/DSA%20Lab/Week%207/priority_queue.c | sjp-codes/PESU-Hub 079734f SEM 3/DSA/DSA Lab/Week 7/priority_queue.c | true | 200 | 5,068 | // The task scheduler must handle the following complexities:
// Task Preemption: A lower priority task can be interrupted and paused if a higher priority task arrives.
// Dynamic Priority Changes: The priority of certain tasks can dynamically change based on system requirements.
// Task Dependencies: Some tasks can on... | 4 |
echanjan/holbertonschool-low_level_programming | 66094ad | more_functions_nested_loops/6-print_line.c | C | www.github.com/echanjan/holbertonschool-low_level_programming/tree/main/more_functions_nested_loops/6-print_line.c | https://raw.githubusercontent.com/echanjan/holbertonschool-low_level_programming/66094ad/more_functions_nested_loops/6-print_line.c | echanjan/holbertonschool-low_level_programming 66094ad more_functions_nested_loops/6-print_line.c | true | 200 | 297 | #include "main.h"
/**
*print_line - funt draws a straight line in the terminal
*@n: number of times the character _ should be printed
*/
void print_line(int n)
{
if (n <= 0)
{
_putchar ('\n');
}
else
{
int j;
for (j = 1; j <= n; j++)
{
_putchar('_');
}
_putchar('\n');
}
}
| 3 |
georgemillen/alx-low_level_programming | f64d8c0 | 0x02-functions_nested_loops/4-isalpha.c | C | www.github.com/georgemillen/alx-low_level_programming/tree/main/0x02-functions_nested_loops/4-isalpha.c | https://raw.githubusercontent.com/georgemillen/alx-low_level_programming/f64d8c0/0x02-functions_nested_loops/4-isalpha.c | georgemillen/alx-low_level_programming f64d8c0 0x02-functions_nested_loops/4-isalpha.c | true | 200 | 279 | #include"main.h"
/**
* _isalpha - check if char is uppercase or lowercase
* @c: is the char to be checked
* Return: 1 if uppercseor lowercase, 0 if otherwise
*/
int _isalpha(int c)
{
if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'))
return (1);
else
return (0);
}
| 0 |
Kenywonder10/alx-low_level_programming | 37a2a1e | 0x0B-malloc_free/0-create_array.c | C | www.github.com/Kenywonder10/alx-low_level_programming/tree/main/0x0B-malloc_free/0-create_array.c | https://raw.githubusercontent.com/Kenywonder10/alx-low_level_programming/37a2a1e/0x0B-malloc_free/0-create_array.c | Kenywonder10/alx-low_level_programming 37a2a1e 0x0B-malloc_free/0-create_array.c | true | 200 | 520 | #include "main.h"
/**
*create_array -creates an arra of chars, and
*initialzes it with a specific char
*@size: size of the array
*@c: character to insert
*Return: NULL if size is zer0 pr if it fails,
*pointer to array if everything is normal
*/
char *create_array(unsigned int size, char c)
{
char *array;
unsigned in... | 4 |
yoliveros/c-opengl | 4d754f1 | src/main.c | C | www.github.com/yoliveros/c-opengl/tree/main/src/main.c | https://raw.githubusercontent.com/yoliveros/c-opengl/4d754f1/src/main.c | yoliveros/c-opengl 4d754f1 src/main.c | true | 200 | 4,725 | #include "cglm/affine-pre.h"
#include "cglm/mat4.h"
#include "cglm/types.h"
#include "cglm/vec4.h"
#include "glad/glad.h"
#include "src/shader.h"
#define STB_IMAGE_IMPLEMENTATION
#include "stb/stb_image.h"
#include <GLFW/glfw3.h>
#include <cglm/cglm.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
void f... | 3 |
camradeling/voodooboard | b9453a8 | app_config.h | C | www.github.com/camradeling/voodooboard/tree/main/app_config.h | https://raw.githubusercontent.com/camradeling/voodooboard/b9453a8/app_config.h | camradeling/voodooboard b9453a8 app_config.h | true | 200 | 8,439 | #ifndef APP_CONFIG_H
#define APP_CONFIG_H
//------------------------------------------------------------------------------
#include <stdint.h>
#include "FreeRTOS.h"
#include "semphr.h"
//------------------------------------------------------------------------------
#define DATA0 8
#define DATA0_PORT ... | 0 |
aviiciii/misc | 98ce032 | sem4-practicals/coloring.c | C | www.github.com/aviiciii/misc/tree/main/sem4-practicals/coloring.c | https://raw.githubusercontent.com/aviiciii/misc/98ce032/sem4-practicals/coloring.c | aviiciii/misc 98ce032 sem4-practicals/coloring.c | true | 200 | 1,056 | #include <stdio.h>
#include <stdbool.h>
#define MAX_COLORS 2
int graph[3][3] = {
{0, 1, 1},
{1, 0, 1},
{1, 1, 0}
};
int colors[3];
bool is_safe(int node, int color) {
for (int i = 0; i < 3; i++) {
if (graph[node][i] && colors[i] == color) {
return false;
}
}
retur... | 7 |
shimelisa/alx-low_level_programming | d72b3c0 | 0x02-functions_nested_loops/9-times_table.c | C | www.github.com/shimelisa/alx-low_level_programming/tree/main/0x02-functions_nested_loops/9-times_table.c | https://raw.githubusercontent.com/shimelisa/alx-low_level_programming/d72b3c0/0x02-functions_nested_loops/9-times_table.c | shimelisa/alx-low_level_programming d72b3c0 0x02-functions_nested_loops/9-times_table.c | true | 200 | 404 | #include "main.h"
/**
* times_table - print 9 times table
*/
void times_table(void)
{
int i, j, k;
for (i = 0; i < 10; i++)
{
_putchar(0 + '0');
for (j = 1; j < 10; j++)
{
k = i * j;
_putchar(',');
_putchar(' ');
if (k < 10)
{
_putchar(' ');
_putchar(k + '0');
}
else
{
_put... | 6 |
happycoder74/adventofcode | db2b69d | C/2024/aoc_2024_06.c | C | www.github.com/happycoder74/adventofcode/tree/main/C/2024/aoc_2024_06.c | https://raw.githubusercontent.com/happycoder74/adventofcode/db2b69d/C/2024/aoc_2024_06.c | happycoder74/adventofcode db2b69d C/2024/aoc_2024_06.c | true | 200 | 5,905 | #include "aoc_header.h"
#include "aoc_timer.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
struct position {
int row;
int column;
};
struct direction {
int x;
int y;
};
struct map {
char data[150][150];
struct direction direction[150][150];
s... | 3 |
jonathanyfang/C-Data-Structures | 0b1ae36 | hashtable/hashtable.c | C | www.github.com/jonathanyfang/C-Data-Structures/tree/main/hashtable/hashtable.c | https://raw.githubusercontent.com/jonathanyfang/C-Data-Structures/0b1ae36/hashtable/hashtable.c | jonathanyfang/C-Data-Structures 0b1ae36 hashtable/hashtable.c | true | 200 | 3,702 | /*
* hashtable.h - header file for CS50 hashtable module
*
* A *hashtable* is a set of (key,item) pairs. It acts just like a set,
* but is far more efficient for large collections.
*
* Jonathan Fang
* October 9, 2022
* CS50, Fall 2022
*/
#ifndef __HASHTABLE_H
#define __HASHTABLE_H
#include <stdio.h>
#incl... | 0 |
aadijawanjal/CP-CODES | acd414c | C_Tutorials/random/pointers_8.c | C | www.github.com/aadijawanjal/CP-CODES/tree/main/C_Tutorials/random/pointers_8.c | https://raw.githubusercontent.com/aadijawanjal/CP-CODES/acd414c/C_Tutorials/random/pointers_8.c | aadijawanjal/CP-CODES acd414c C_Tutorials/random/pointers_8.c | true | 200 | 673 | // WLUG Community Meet - Pointers 1
#include <stdio.h>
int main(void) {
int x = 20;
int y = 50;
y = *(&y) * *(&x); //1000
printf("%d\n", y); //1000
y = ((long int)&x - (long int)&y); //4 or -4
printf("%d\n", y); //4 or -4
int* ptr;
ptr = &x; //
*ptr = y++;
printf("... | 2 |
kristof-levai-github/C-Studies-and-Projects | d4a1f8f | ReadInterval/read_interval1.c | C | www.github.com/kristof-levai-github/C-Studies-and-Projects/tree/main/ReadInterval/read_interval1.c | https://raw.githubusercontent.com/kristof-levai-github/C-Studies-and-Projects/d4a1f8f/ReadInterval/read_interval1.c | kristof-levai-github/C-Studies-and-Projects d4a1f8f ReadInterval/read_interval1.c | true | 200 | 337 | #include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define N 10
void read_int(int *x) {
while (scanf("%d", x) != 1) {
printf("Invalid input!\n");
while (getchar() != '\n');
}
}
int main(void) {
int x;
printf("Adj meg egy szamot ");
read_int(&x);
printf("Az altalad megadott szam: %d", x);... | 1 |
YashDoke/4DimensionsInfotechSudents | 02ba0cc | Vivek_Desai/practic_set2/question_11.c | C | www.github.com/YashDoke/4DimensionsInfotechSudents/tree/main/Vivek_Desai/practic_set2/question_11.c | https://raw.githubusercontent.com/YashDoke/4DimensionsInfotechSudents/02ba0cc/Vivek_Desai/practic_set2/question_11.c | YashDoke/4DimensionsInfotechSudents 02ba0cc Vivek_Desai/practic_set2/question_11.c | true | 200 | 342 | #include<stdio.h>
int main(){
int num;
printf("Enter the 4 digit number");
scanf("%d",&num);
int first = num/1000;
num = num%1000;
int second = num/100;
num = num%100;
int therd = num/10;
int forth = num%10;
num = forth*1000+therd*100+second*10+first;
printf("%d... | 6 |
Rediet-Geremew/alx-low_level_programming | 9fdaaa3 | 0x0F-function_pointers/0-print_name.c | C | www.github.com/Rediet-Geremew/alx-low_level_programming/tree/main/0x0F-function_pointers/0-print_name.c | https://raw.githubusercontent.com/Rediet-Geremew/alx-low_level_programming/9fdaaa3/0x0F-function_pointers/0-print_name.c | Rediet-Geremew/alx-low_level_programming 9fdaaa3 0x0F-function_pointers/0-print_name.c | true | 200 | 250 | #include "function_pointers.h"
/**
* print_name - a function that prints a name
* @name: the name to be printed
* @f: a pointer to a function
*/
void print_name(char *name, void (*f)(char *))
{
if (name != NULL && f != NULL)
{
f(name);
}
}
| 4 |
aalborg-supercomputer-klubben/atlas | 80270d7 | src/lapack/ATL_getrs.c | C | www.github.com/aalborg-supercomputer-klubben/atlas/tree/main/src/lapack/ATL_getrs.c | https://raw.githubusercontent.com/aalborg-supercomputer-klubben/atlas/80270d7/src/lapack/ATL_getrs.c | aalborg-supercomputer-klubben/atlas 80270d7 src/lapack/ATL_getrs.c | true | 200 | 3,083 | /*
* Automatically Tuned Linear Algebra Software v3.11.41
* (C) Copyright 1999 R. Clint Whaley
*/
#include "atlas_misc.h"
#include "atlas_lapack.h"
void ATL_getrs(const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE Trans,
const int N, const int NRHS, const TYPE *A, const int lda,
... | 5 |
shubhamjaiswal1998/c-c-code | 5018898 | c++_code/sort.c | C | www.github.com/shubhamjaiswal1998/c-c-code/tree/main/c++_code/sort.c | https://raw.githubusercontent.com/shubhamjaiswal1998/c-c-code/5018898/c%2B%2B_code/sort.c | shubhamjaiswal1998/c-c-code 5018898 c++_code/sort.c | true | 200 | 6,151 | #include <stdio.h>
#include <stdlib.h>
void insertionSort(int arr[], int n)
{
for (int i = 1; i < n; i++)
{
int current = arr[i];
int j = i - 1;
// Move elements of arr[0..i-1] that are greater than current
// to one position ahead of their current position
while (j >= 0... | 3 |
mid0o/alx-low_level_programming | d1679a7 | 0x13-more_singly_linked_lists/2-add_nodeint.c | C | www.github.com/mid0o/alx-low_level_programming/tree/main/0x13-more_singly_linked_lists/2-add_nodeint.c | https://raw.githubusercontent.com/mid0o/alx-low_level_programming/d1679a7/0x13-more_singly_linked_lists/2-add_nodeint.c | mid0o/alx-low_level_programming d1679a7 0x13-more_singly_linked_lists/2-add_nodeint.c | true | 200 | 563 | #include "lists.h"
#include <stdlib.h>
#include <stddef.h>
/**
* add_nodeint - add a new node at the beginning of a list
* Description: this function takes the head of a list and adds a node at
* the beginning of it and return the new pointre
* @head: pointer to a pointer to a list
* @n: data to add
* Return: a p... | 0 |
Ahma-d1/DataStructures | 72e3401 | fibonacci.c | C | www.github.com/Ahma-d1/DataStructures/tree/main/fibonacci.c | https://raw.githubusercontent.com/Ahma-d1/DataStructures/72e3401/fibonacci.c | Ahma-d1/DataStructures 72e3401 fibonacci.c | true | 200 | 385 | // WAP to print nth term fibonacci series using recursion?
#include <stdio.h>
int fib(int n)
{
if (n == 1 || n == 2)
{
return 1;
}
else
{
return fib(n - 1) + fib(n - 2);
}
}
int main()
{
int n;
printf("Enter the term of fibonacci you want : ");
scanf("%d", &n);
int f = fib(n);
printf(... | 7 |
ramkrishnajha5/c-and-cpp-programs | 51ab95a | C-Programs/Pattern/StarPattern1.C | C | www.github.com/ramkrishnajha5/c-and-cpp-programs/tree/main/C-Programs/Pattern/StarPattern1.C | https://raw.githubusercontent.com/ramkrishnajha5/c-and-cpp-programs/51ab95a/C-Programs/Pattern/StarPattern1.C | ramkrishnajha5/c-and-cpp-programs 51ab95a C-Programs/Pattern/StarPattern1.C | true | 200 | 230 | #include<stdio.h>
int main()
{
int i,j;
for(i=1;i<=7;i++)
{
for(j=1;j<=i;j++)
{
if(i%2==0)
{
printf(" \n");
break;
}
else
{
printf("* ");
}
}
printf("\n");
}
return 0;
} | 2 |
AFOP/holbertonschool-interview | 0c1b2ff | sorted_array_to_avl/0-sorted_array_to_avl.c | C | www.github.com/AFOP/holbertonschool-interview/tree/main/sorted_array_to_avl/0-sorted_array_to_avl.c | https://raw.githubusercontent.com/AFOP/holbertonschool-interview/0c1b2ff/sorted_array_to_avl/0-sorted_array_to_avl.c | AFOP/holbertonschool-interview 0c1b2ff sorted_array_to_avl/0-sorted_array_to_avl.c | true | 200 | 1,249 | #include "binary_trees.h"
/**
* sorted_array_to_avl - convert array to avl tree
* @array: array to convert.
* @size: size of array.
* Return: tree.
*/
avl_t *sorted_array_to_avl(int *array, size_t size)
{
avl_t *tree = NULL;
tree = recursive_tree(array, 0, (int)size - 1);
if (!tree)
return (NULL);
return (t... | 6 |
Pratehu/Computer-Science-Engineering | e8b1457 | SEMESTER5/PPWC/Assignment3/Question9.c | C | www.github.com/Pratehu/Computer-Science-Engineering/tree/main/SEMESTER5/PPWC/Assignment3/Question9.c | https://raw.githubusercontent.com/Pratehu/Computer-Science-Engineering/e8b1457/SEMESTER5/PPWC/Assignment3/Question9.c | Pratehu/Computer-Science-Engineering e8b1457 SEMESTER5/PPWC/Assignment3/Question9.c | true | 200 | 1,116 | #include <stdio.h>
#include <string.h>
#include <ctype.h>
#define ASCII_SIZE 256 // Total ASCII characters
// Function to count the occurrences of each character
void countCharacters(char str[]) {
int char_count[ASCII_SIZE] = {0}; // Array to store character counts
// Count each character in the string
f... | 5 |
zhadavla/ft_minishell | 2194d4f | src/builtins/exit.c | C | www.github.com/zhadavla/ft_minishell/tree/main/src/builtins/exit.c | https://raw.githubusercontent.com/zhadavla/ft_minishell/2194d4f/src/builtins/exit.c | zhadavla/ft_minishell 2194d4f src/builtins/exit.c | true | 200 | 1,907 | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* exit.c :+: :+: :+: ... | 4 |
DeviousCardi/BTP | 720b738 | deepfix_data/prob46/correct/prog25291-user193.c | C | www.github.com/DeviousCardi/BTP/tree/main/deepfix_data/prob46/correct/prog25291-user193.c | https://raw.githubusercontent.com/DeviousCardi/BTP/720b738/deepfix_data/prob46/correct/prog25291-user193.c | DeviousCardi/BTP 720b738 deepfix_data/prob46/correct/prog25291-user193.c | true | 200 | 254 | #include <stdio.h>
int main(){
int n,m;
scanf("%d%d",m,n);
int count=0;
int i;
for(i=2 ;i<=(n-1) ;i++) {
if(n%i!=0) {
continue; }
count=count+1; }
if(count==m){
printf("YES"); }
else {
printf("NO"); }
return 0; } | 3 |
JuuhL03/2SEM-CC | 58af0c4 | C/Aula 3/aula 3 - ex4.c | C | www.github.com/JuuhL03/2SEM-CC/tree/main/C/Aula 3/aula 3 - ex4.c | https://raw.githubusercontent.com/JuuhL03/2SEM-CC/58af0c4/C/Aula%203/aula%203%20-%20ex4.c | JuuhL03/2SEM-CC 58af0c4 C/Aula 3/aula 3 - ex4.c | true | 200 | 390 | #include <stdio.h>
#include <stdlib.h>
#include <locale.h>
int main() {
setlocale(LC_ALL, "Portuguese");
system("color B");
int n;
float t= 0.0,ced[8];
for(n = 0; n < 8; n++){
printf("Qual o valor da cédula %i? ", n + 1);
scanf("%f", &ced[n]);
t += ced[n];
}
printf("V... | 1 |
MMTObservatory/mmtao_old | 12bd48d | wish/VoltMeter/VoltMeter_Get.c | C | www.github.com/MMTObservatory/mmtao_old/tree/main/wish/VoltMeter/VoltMeter_Get.c | https://raw.githubusercontent.com/MMTObservatory/mmtao_old/12bd48d/wish/VoltMeter/VoltMeter_Get.c | MMTObservatory/mmtao_old 12bd48d wish/VoltMeter/VoltMeter_Get.c | true | 200 | 884 | /*===========================================================================*
**
** VoltMeter_Get.c
**
** Routines to retrive information from a motor
**
** Returns : 0 success
** -1 error
**
** Written 30mar04 DLM Started with OAP_Status. Trying to make this a
** a generi... | 0 |
Hari97512sh/Harish | 900085c | Untitled41.c | C | www.github.com/Hari97512sh/Harish/tree/main/Untitled41.c | https://raw.githubusercontent.com/Hari97512sh/Harish/900085c/Untitled41.c | Hari97512sh/Harish 900085c Untitled41.c | true | 200 | 415 | #include<stdio.h> //linear search using loc -1
main()
{
int a[50];
int i,key,loc=-1;
printf("enter the elements\n");
for(i=0;i<5;i++)
{
scanf("%d",&a[i]);
}
key=3;
for(i=0;i<5;i++)
{
if(a[i]==key)
{
printf("\n key found : %d",key);
printf("\n the index of the key... | 7 |
enricobolzonello/TravellingSalesmanOptimization | 769db30 | src/algorithms/matheuristics.c | C | www.github.com/enricobolzonello/TravellingSalesmanOptimization/tree/main/src/algorithms/matheuristics.c | https://raw.githubusercontent.com/enricobolzonello/TravellingSalesmanOptimization/769db30/src/algorithms/matheuristics.c | enricobolzonello/TravellingSalesmanOptimization 769db30 src/algorithms/matheuristics.c | true | 200 | 17,309 | #include "matheuristics.h"
ERROR_CODE mh_HardFixing()
{
ERROR_CODE e = T_OK;
log_info("running Hard Fixing");
// open CPLEX model
int error;
CPXENVptr env = CPXopenCPLEX(&error);
if (error)
{
log_fatal("CPX code %d : CPXopenCPLEX() error", error);
e = FAILED_PRECONDITION;
... | 2 |
SamKinnon/alx-low_level_programming | 4ba8e81 | 0x0F-function_pointers/0-print_name.c | C | www.github.com/SamKinnon/alx-low_level_programming/tree/main/0x0F-function_pointers/0-print_name.c | https://raw.githubusercontent.com/SamKinnon/alx-low_level_programming/4ba8e81/0x0F-function_pointers/0-print_name.c | SamKinnon/alx-low_level_programming 4ba8e81 0x0F-function_pointers/0-print_name.c | true | 200 | 267 | #include "function_pointers.h"
#include <stdio.h>
/**
* print_name - function that use pointer to function
* @name: String
* @f: pointer
* Return: nothing
*/
void print_name(char *name, void (*f)(char *))
{
if (name == NULL || f == NULL)
return;
f(name);
}
| 6 |
fifki/Algorithms-and-data-structer-with-C | 13d8409 | dynamic_programming/longest_comm_seq.c | C | www.github.com/fifki/Algorithms-and-data-structer-with-C/tree/main/dynamic_programming/longest_comm_seq.c | https://raw.githubusercontent.com/fifki/Algorithms-and-data-structer-with-C/13d8409/dynamic_programming/longest_comm_seq.c | fifki/Algorithms-and-data-structer-with-C 13d8409 dynamic_programming/longest_comm_seq.c | true | 200 | 748 | #include<stdio.h>
#include<string.h>
int max(int a, int b ){
return a>b ? a:b ;
}
int longest(int n , int m , char text1[n], char text2[m]){
int matrix[n+1][m+1];
//intialisation
for (int i=0; i<n+1; i++){
for(int j=0; j<m+1; j++){
matrix[i][j]=0;
}
}
for (int i=1;... | 4 |
jminor717/esp32_Drone | b9083ac | Common/GPSCalc.h | C | www.github.com/jminor717/esp32_Drone/tree/main/Common/GPSCalc.h | https://raw.githubusercontent.com/jminor717/esp32_Drone/b9083ac/Common/GPSCalc.h | jminor717/esp32_Drone b9083ac Common/GPSCalc.h | true | 200 | 511 | #include "stdbool.h"
#include "stdint.h"
struct GPSCord {
double x;
double y;
double z;
double radius;
double nx;
double ny;
double nz;
};
struct coordinate {
double lat;
double lon;
double elv;
};
struct PointingVector {
double Distance;
double Azimuth;
double Alt... | 5 |
OmarFaruq947/Learn-Language-C-program- | ef2c16a | OLD-Code/for loop/triangle pattern print a,b,c,d/triangle pattern print a,b,c,d .c | C | www.github.com/OmarFaruq947/Learn-Language-C-program-/tree/main/OLD-Code/for loop/triangle pattern print a,b,c,d/triangle pattern print a,b,c,d .c | https://raw.githubusercontent.com/OmarFaruq947/Learn-Language-C-program-/ef2c16a/OLD-Code/for%20loop/triangle%20%20pattern%20%20print%20a%2Cb%2Cc%2Cd/triangle%20%20pattern%20%20print%20a%2Cb%2Cc%2Cd%20.c | OmarFaruq947/Learn-Language-C-program- ef2c16a OLD-Code/for loop/triangle pattern print a,b,c,d/triangle pattern print a,b,c,d .c | true | 200 | 364 | #include<stdio.h>
int main()
{
char i,j,n;
printf ("enter the ascii cod: ");
scanf ("%d",&n);
for (i=65;i<n;i++) /*ASCII code অনুসারে কাজ হচ্চে এখানে a=৬৫ থেকে শুরু*/
{
for (j=65;j<=i;j++)
{
printf("%c",j);
}
printf("\n");
}
}
| 1 |
Aniket-Kumar91/Rock-Paper-Scissor-Game | 8f085bc | practice.c | C | www.github.com/Aniket-Kumar91/Rock-Paper-Scissor-Game/tree/main/practice.c | https://raw.githubusercontent.com/Aniket-Kumar91/Rock-Paper-Scissor-Game/8f085bc/practice.c | Aniket-Kumar91/Rock-Paper-Scissor-Game 8f085bc practice.c | true | 200 | 1,135 | // // C Program to demonstrate Structure pointer
// #include <stdio.h>
// #include <string.h>
// // struct Student {
// // int roll_no;
// // char name[30];
// // char branch[40];
// // int batch;
// // // };
// // int main()
// // {
// // struct Student s1;
// // struct Stu... | 0 |
TofunmiPhoebe/alx-low_level_programming | 754c6de | 0x05-pointers_arrays_strings/3-puts.c | C | www.github.com/TofunmiPhoebe/alx-low_level_programming/tree/main/0x05-pointers_arrays_strings/3-puts.c | https://raw.githubusercontent.com/TofunmiPhoebe/alx-low_level_programming/754c6de/0x05-pointers_arrays_strings/3-puts.c | TofunmiPhoebe/alx-low_level_programming 754c6de 0x05-pointers_arrays_strings/3-puts.c | true | 200 | 215 | #include "main.h"
/**
* _puts - Prints a string
* @str: The string to print
* Return: Nothing
*/
void _puts(char *str)
{
int i = 0;
while (str[i] != '\0')
{
_putchar(str[i]);
i++;
}
_putchar('\n');
}
| 7 |
jdecorte-be/42-Ft_nm | 7b273e4 | src/sort.c | C | www.github.com/jdecorte-be/42-Ft_nm/tree/main/src/sort.c | https://raw.githubusercontent.com/jdecorte-be/42-Ft_nm/7b273e4/src/sort.c | jdecorte-be/42-Ft_nm 7b273e4 src/sort.c | true | 200 | 706 | #include "ft_nm.h"
void merge(t_sym *syms, int l, int m, int r)
{
int i, j, k;
int n1 = m - l + 1;
int n2 = r - m;
t_sym L[n1], R[n2];
for (i = 0; i < n1; i++)
L[i] = syms[l + i];
for (j = 0; j < n2; j++)
R[j] = syms[m + 1 + j];
i = 0;
j = 0;
k = l;
while (i < n1 && j < n2)
{
if (strcmp(L[i].name, ... | 3 |
simal24k/24K-0688 | a1e4447 | LAB 08/Q2.c | C | www.github.com/simal24k/24K-0688/tree/main/LAB 08/Q2.c | https://raw.githubusercontent.com/simal24k/24K-0688/a1e4447/LAB%2008/Q2.c | simal24k/24K-0688 a1e4447 LAB 08/Q2.c | true | 200 | 927 | #include <stdio.h>
int main()
{
int n, start;
printf("Enter the number of pairs: ");
scanf("%d", &n);
printf("Enter the starting number: ");
scanf("%d", &start);
int arr[2][n][2];
int roundOdd = 0, roundEven = 0;
for (int i = start; roundOdd < n || roundEven < n; i--)
{
if... | 6 |
gunta-skrastina/miniRT | fa77ecc | src/main.c | C | www.github.com/gunta-skrastina/miniRT/tree/main/src/main.c | https://raw.githubusercontent.com/gunta-skrastina/miniRT/fa77ecc/src/main.c | gunta-skrastina/miniRT fa77ecc src/main.c | true | 200 | 1,565 | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.c :+: :+: :+: ... | 4 |
Dagmawi-Kebede/alx-low_level_programming | 2934e95 | 0x04-more_functions_nested_loops/100-prime_factor.c | C | www.github.com/Dagmawi-Kebede/alx-low_level_programming/tree/main/0x04-more_functions_nested_loops/100-prime_factor.c | https://raw.githubusercontent.com/Dagmawi-Kebede/alx-low_level_programming/2934e95/0x04-more_functions_nested_loops/100-prime_factor.c | Dagmawi-Kebede/alx-low_level_programming 2934e95 0x04-more_functions_nested_loops/100-prime_factor.c | true | 200 | 291 | #include <stdio.h>
/**
* main - prints the largest prime factor of the number 612852475143.
*
* Return: Always 0
*
*/
int main(void)
{
long int n, p;
n = 612852475143;
for (p = 2; p <= n; p++)
{
if (n % p == 0)
{
n /= p;
p--;
}
}
printf("%ld\n", p);
return (0);
}
| 5 |
PoznyakovaMaria/laba09 | 16b48ce | FileName.c | C | www.github.com/PoznyakovaMaria/laba09/tree/main/FileName.c | https://raw.githubusercontent.com/PoznyakovaMaria/laba09/16b48ce/FileName.c | PoznyakovaMaria/laba09 16b48ce FileName.c | true | 200 | 1,647 | #define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <locale.h>
#define _USE_MATH_DEFINES
#include <math.h>
#define ROW 9
#define COL 9
//1.16
int main() {
setlocale(LC_ALL, "RUS");
int row, col;
for (row = 1; row <= ROW; ++row) {
for (col = 1; col <= row; col++) {
... | 1 |
carolinelmu1/CMSI284-Caroline-Maria-Denali | 0435d18 | homework/homework05/dec2hex.c | C | www.github.com/carolinelmu1/CMSI284-Caroline-Maria-Denali/tree/main/homework/homework05/dec2hex.c | https://raw.githubusercontent.com/carolinelmu1/CMSI284-Caroline-Maria-Denali/0435d18/homework/homework05/dec2hex.c | carolinelmu1/CMSI284-Caroline-Maria-Denali 0435d18 homework/homework05/dec2hex.c | true | 200 | 242 | #include <stdio.h>
#include <stdlib.h>
int main(int argc, char * argv[]) {
int dec = atoi(argv[1]);
int bit = atoi(argv[2]);
if(bit == 32) {
printf("%08x", dec);
}else {
printf("%016x", dec);
}
return 0;
}
| 2 |
subodhkryadav/C- | 5e46377 | chapter 7/aray_2d.c | C | www.github.com/subodhkryadav/C-/tree/main/chapter 7/aray_2d.c | https://raw.githubusercontent.com/subodhkryadav/C-/5e46377/chapter%207/aray_2d.c | subodhkryadav/C- 5e46377 chapter 7/aray_2d.c | true | 200 | 334 | #include<stdio.h>
int main(){
int marks[2][3];
//first student marks stored
marks[0][0]=90;
marks[0][1]=89;
marks[0][2]=77;
//second student mark stored
marks[1][0]=90;
marks[1][1]=89;
marks[1][2]=77;
//print the sencond student second subject marks
printf("marks is =%d",m... | 7 |
SHOVON944/C-Basic-Declarations-and-Expressions--150-exercises-with-solution- | 4ceba38 | 51_running/48.c | C | www.github.com/SHOVON944/C-Basic-Declarations-and-Expressions--150-exercises-with-solution-/tree/main/51_running/48.c | https://raw.githubusercontent.com/SHOVON944/C-Basic-Declarations-and-Expressions--150-exercises-with-solution-/4ceba38/51_running/48.c | SHOVON944/C-Basic-Declarations-and-Expressions--150-exercises-with-solution- 4ceba38 51_running/48.c | true | 200 | 327 | #include<stdio.h>
int main()
{
int arr[7];
printf("Enter the value: \n");
for(int i=0; i<7; i++){
scanf("%d",&arr[i]);
}
for(int i=0; i<7; i++){
if(arr[i]>0){
printf("n[%d] = %d\n",i,arr[i]);
} else{
printf("n[%d] = 100\n",i);
}
}
retu... | 3 |
Nicolasalan/data_structure | 655494a | LES/insertion.c | C | www.github.com/Nicolasalan/data_structure/tree/main/LES/insertion.c | https://raw.githubusercontent.com/Nicolasalan/data_structure/655494a/LES/insertion.c | Nicolasalan/data_structure 655494a LES/insertion.c | true | 200 | 1,096 | #include <stdio.h>
#define capacity 10
void print(int list[], int n){
for(int i = 0; i < n; i++){
printf("%d ", list[i]);
}
printf("\n");
}
int insertion_position(int list[], int value, int n){
int idx = 0;
if(n == capacity)
return -1;
while(value > list[idx] && idx ... | 6 |
Sandeep-Reddy-18/codemind-c | 06a98d9 | To_Lower_Case.c | C | www.github.com/Sandeep-Reddy-18/codemind-c/tree/main/To_Lower_Case.c | https://raw.githubusercontent.com/Sandeep-Reddy-18/codemind-c/06a98d9/To_Lower_Case.c | Sandeep-Reddy-18/codemind-c 06a98d9 To_Lower_Case.c | true | 200 | 216 | #include<stdio.h>
#include<ctype.h>
#include<string.h>
int main()
{
char str[101];
scanf("%[^
]s", &str);
for(int i=0; i<strlen(str); i++) {
str[i] = tolower(str[i]);
}
printf("%s",str);
} | 0 |
Team-Resurgent/RXDK-SDL2POP | e45f3da | source/test/SDL_test_memory.c | C | www.github.com/Team-Resurgent/RXDK-SDL2POP/tree/main/source/test/SDL_test_memory.c | https://raw.githubusercontent.com/Team-Resurgent/RXDK-SDL2POP/e45f3da/source/test/SDL_test_memory.c | Team-Resurgent/RXDK-SDL2POP e45f3da source/test/SDL_test_memory.c | true | 200 | 6,955 | /*
Simple DirectMedia Layer
Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this ... | 4 |
SheoTM/C | a1cb49c | ex3.c | C | www.github.com/SheoTM/C/tree/main/ex3.c | https://raw.githubusercontent.com/SheoTM/C/a1cb49c/ex3.c | SheoTM/C a1cb49c ex3.c | true | 200 | 931 | #include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include "ex3.h"
void run_ex3() {
int rows, cols;
printf("Row: ");
if (scanf("%d", &rows) != 1 || rows <= 0) {
printf("Row must be over 0\n");
return;
}
printf("Column: ");
if (scanf("%d", &cols) != 1 || cols <= 0) {
... | 5 |
yumosx/qbe-src | 7a34d17 | lisc/parse.c | C | www.github.com/yumosx/qbe-src/tree/main/lisc/parse.c | https://raw.githubusercontent.com/yumosx/qbe-src/7a34d17/lisc/parse.c | yumosx/qbe-src 7a34d17 lisc/parse.c | true | 200 | 8,860 | /* really crude parser
*/
#include <ctype.h>
#include <string.h>
#include "lisc.h"
enum {
NSym = 256,
};
Ins insb[NIns], *curi;
/*定义的一些操作树*/
OpDesc opdesc[OLast] = {
[OAdd] = { 2, 1, "add" },
[OSub] = { 2, 0, "sub" },
[ODiv] = { 2, 0, "div" },
[ORem] = { 2, 0, "mod" },
[OCopy] = { 1, 0, "copy" },
};
typedef... | 2 |
Kielan/dune_sculpt | 8857511 | source/dune/structs/structs_view2d_types.h | C | www.github.com/Kielan/dune_sculpt/tree/main/source/dune/structs/structs_view2d_types.h | https://raw.githubusercontent.com/Kielan/dune_sculpt/8857511/source/dune/structs/structs_view2d_types.h | Kielan/dune_sculpt 8857511 source/dune/structs/structs_view2d_types.h | true | 200 | 5,179 | #pragma once
#include "DNA_vec_types.h"
/* ---------------------------------- */
/** View 2D data - stored per region. */
typedef struct View2D {
/** Tot - area that data can be drawn in; cur - region of tot that is visible in viewport. */
rctf tot, cur;
/** Vert - vertical scrollbar region; hor - horizontal s... | 3 |
ZUITOPIA/network-protocol | 04e70d0 | ARQ-training/mbed/TARGET_NUCLEO_F446RE/TARGET_STM/TARGET_STM32F4/TARGET_STM32F446xE/TARGET_NUCLEO_F446RE/PinNames.h | C | www.github.com/ZUITOPIA/network-protocol/tree/main/ARQ-training/mbed/TARGET_NUCLEO_F446RE/TARGET_STM/TARGET_STM32F4/TARGET_STM32F446xE/TARGET_NUCLEO_F446RE/PinNames.h | https://raw.githubusercontent.com/ZUITOPIA/network-protocol/04e70d0/ARQ-training/mbed/TARGET_NUCLEO_F446RE/TARGET_STM/TARGET_STM32F4/TARGET_STM32F446xE/TARGET_NUCLEO_F446RE/PinNames.h | ZUITOPIA/network-protocol 04e70d0 ARQ-training/mbed/TARGET_NUCLEO_F446RE/TARGET_STM/TARGET_STM32F4/TARGET_STM32F446xE/TARGET_NUCLEO_F446RE/PinNames.h | true | 200 | 7,084 | /* mbed Microcontroller Library
*******************************************************************************
* Copyright (c) 2018, STMicroelectronics
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following con... | 7 |
flyboyGo/Test-Data-Structure | ae352ca | demoS8.8/demoS8.8/main.c | C | www.github.com/flyboyGo/Test-Data-Structure/tree/main/demoS8.8/demoS8.8/main.c | https://raw.githubusercontent.com/flyboyGo/Test-Data-Structure/ae352ca/demoS8.8/demoS8.8/main.c | flyboyGo/Test-Data-Structure ae352ca demoS8.8/demoS8.8/main.c | true | 200 | 2,261 | #define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <time.h>
//��ӡ����
void Print(int* a, int n)
{
int i = 0;
for (i = 0; i < n; i++)
{
printf("%d ", a[i]);
}
printf("\n");
}
//////////////////��������
//ֱ�Ӳ�������
//ʱ�临�Ӷ�O(n^2)
//ʱ�临�Ӷȿ�... | 6 |
Zochrab/42-Projects | 54c55d2 | Philosophers/philo/src/actions.c | C | www.github.com/Zochrab/42-Projects/tree/main/Philosophers/philo/src/actions.c | https://raw.githubusercontent.com/Zochrab/42-Projects/54c55d2/Philosophers/philo/src/actions.c | Zochrab/42-Projects 54c55d2 Philosophers/philo/src/actions.c | true | 200 | 2,253 | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* actions.c :+: :+: :+: ... | 1 |
anwerkamalrizvi/PF-THEORY | 69043ed | Assignment 3/Q7/q7.c | C | www.github.com/anwerkamalrizvi/PF-THEORY/tree/main/Assignment 3/Q7/q7.c | https://raw.githubusercontent.com/anwerkamalrizvi/PF-THEORY/69043ed/Assignment%203/Q7/q7.c | anwerkamalrizvi/PF-THEORY 69043ed Assignment 3/Q7/q7.c | true | 200 | 4,153 | /*Question 07
In a Netflix-like streaming platform, 2D pointers are used to dynamically manage and personalize
...............................................................................................
needs of a global user base.*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct... | 0 |
JaimeJonathanOrtizVelazco/Data_Structures_And_Algorithms | 3ba1c45 | CodeRunner/CodeRunner/main.c | C | www.github.com/JaimeJonathanOrtizVelazco/Data_Structures_And_Algorithms/tree/main/CodeRunner/CodeRunner/main.c | https://raw.githubusercontent.com/JaimeJonathanOrtizVelazco/Data_Structures_And_Algorithms/3ba1c45/CodeRunner/CodeRunner/main.c | JaimeJonathanOrtizVelazco/Data_Structures_And_Algorithms 3ba1c45 CodeRunner/CodeRunner/main.c | true | 200 | 375 | //
// main.c
// CodeRunner
//
// Created by Jaime Jonathan Ortiz Velazco on 29/10/23.
//
#include <stdio.h>
int fun (int n) {
int x=1, k;
if (n==1) return x;
for (k=1; k<n; ++k){
x=x + fun (k) * fun (n -k);
}
return x;
}
int main(int argc, const char * argv[]) {
// insert... | 4 |
sydbgx/gd32_balance_bike | 97b99a5 | Hardware/usart/usart.c | C | www.github.com/sydbgx/gd32_balance_bike/tree/main/Hardware/usart/usart.c | https://raw.githubusercontent.com/sydbgx/gd32_balance_bike/97b99a5/Hardware/usart/usart.c | sydbgx/gd32_balance_bike 97b99a5 Hardware/usart/usart.c | true | 200 | 2,601 | #include "usart.h"
// value:波特率
void usart_init(uint32_t baudval)
{
/**
* 缓冲区为 0,一有数据就发送
*/
setvbuf(stdout, NULL, _IONBF, 0);
//开启时钟
rcu_periph_clock_enable(BSP_USART_CLOCK);
rcu_periph_clock_enable(BSP_USART_TX_CLOCK);
rcu_periph_clock_enable(BSP_USAR... | 5 |
Xrg360/networkLabS6 | f91f1fe | simplified/exp1_TCP/client.c | C | www.github.com/Xrg360/networkLabS6/tree/main/simplified/exp1_TCP/client.c | https://raw.githubusercontent.com/Xrg360/networkLabS6/f91f1fe/simplified/exp1_TCP/client.c | Xrg360/networkLabS6 f91f1fe simplified/exp1_TCP/client.c | true | 200 | 792 | #include<stdio.h>
#include<string.h>
#include<sys/socket.h>
#include<arpa/inet.h>
void main(){
struct sockaddr_in server,client;
int sockd, client_sock,client_size;
char server_msg[200],client_msg[200];
memset(server_msg,'\0',sizeof(server_msg));
memset(client_msg,'\0',sizeof(client_msg));
s... | 2 |
Vispic2/mud | c097c29 | d/shaolin/putiyuan.c | C | www.github.com/Vispic2/mud/tree/main/d/shaolin/putiyuan.c | https://raw.githubusercontent.com/Vispic2/mud/c097c29/d/shaolin/putiyuan.c | Vispic2/mud c097c29 d/shaolin/putiyuan.c | true | 200 | 4,710 | // Room: /d/shaolin/putiyuan.c
// by Doing Lu 10/10/2K
// 迷题:取易筋经
// 掀“一梦如是”
// xian 一
// xian 梦
// xian 如 3 (因为如有多个,掀第三个)
// xian 是
// 然后look hole可以看到书,get book from hole即可。
#define BOOK "/clone/book/yijinjing"
inherit ROOM;
string look_hole();
string look_jing();
int do_xian(string arg);
int do_get(string arg... | 7 |
Ziemas/csl_decomp | ca07d2a | modhsyn/src/sdwrap.c | C | www.github.com/Ziemas/csl_decomp/tree/main/modhsyn/src/sdwrap.c | https://raw.githubusercontent.com/Ziemas/csl_decomp/ca07d2a/modhsyn/src/sdwrap.c | Ziemas/csl_decomp ca07d2a modhsyn/src/sdwrap.c | true | 200 | 5,918 | #include "modhsyn.h"
#include <libsd.h>
static struct HSyn_DebugInfo *sDebugInfo;
int
HSyn_SetDebugInfoBuffer(struct HSyn_DebugInfo *buffer)
{
sDebugInfo = buffer;
if (buffer) {
buffer->writeIndex = 0;
buffer->readIndex = 0;
}
return 0;
}
static struct HSyn_SdCall *
getCallSlot()
{
struct HSyn_SdCall *ret... | 3 |
Kouagou/alx-low_level_programming | 43ea34f | 0x1A-hash_tables/100-sorted_hash_table.c | C | www.github.com/Kouagou/alx-low_level_programming/tree/main/0x1A-hash_tables/100-sorted_hash_table.c | https://raw.githubusercontent.com/Kouagou/alx-low_level_programming/43ea34f/0x1A-hash_tables/100-sorted_hash_table.c | Kouagou/alx-low_level_programming 43ea34f 0x1A-hash_tables/100-sorted_hash_table.c | true | 200 | 4,656 | #include "hash_tables.h"
shash_table_t *shash_table_create(unsigned long int size);
int shash_table_set(shash_table_t *ht, const char *key, const char *value);
char *shash_table_get(const shash_table_t *ht, const char *key);
void shash_table_print(const shash_table_t *ht);
void shash_table_print_rev(const shash_table_... | 6 |
openeuler-mirror/secGear | b54e065 | component/local_attest/sg_local_attest.h | C | www.github.com/openeuler-mirror/secGear/tree/main/component/local_attest/sg_local_attest.h | https://raw.githubusercontent.com/openeuler-mirror/secGear/b54e065/component/local_attest/sg_local_attest.h | openeuler-mirror/secGear b54e065 component/local_attest/sg_local_attest.h | true | 200 | 1,340 | /*
* Copyright (c) Huawei Technologies Co., Ltd. 2020. All rights reserved.
* secGear is licensed under the Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2
* THIS SOFTWARE I... | 1 |
IbrahimElrifi/alx-low_level_programming | 6e55bdf | 0x04-more_functions_nested_loops/1-isdigit.c | C | www.github.com/IbrahimElrifi/alx-low_level_programming/tree/main/0x04-more_functions_nested_loops/1-isdigit.c | https://raw.githubusercontent.com/IbrahimElrifi/alx-low_level_programming/6e55bdf/0x04-more_functions_nested_loops/1-isdigit.c | IbrahimElrifi/alx-low_level_programming 6e55bdf 0x04-more_functions_nested_loops/1-isdigit.c | true | 200 | 221 | #include "main.h"
/**
* _isdigit - checks if is a digit or not
*@c: integer number
* Return: 1 if c is a digit 0 if not.
*/
int _isdigit(int c)
{
if (c >= '0' && c <= '9')
{
return (1);
}
else
{
return (0);
}
}
| 5 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.