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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
Ishan451/DSA-Library-for-C | 722b5cc | stack.c | C | www.github.com/Ishan451/DSA-Library-for-C/tree/main/stack.c | https://raw.githubusercontent.com/Ishan451/DSA-Library-for-C/722b5cc/stack.c | Ishan451/DSA-Library-for-C 722b5cc stack.c | true | 200 | 1,757 | #include <stdlib.h>
#include "stack.h"
#ifdef ALLOC_TESTING
#include "alloc-testing.h"
#endif
/* Stack */
typedef struct _StackEntry StackEntry;
struct _StackEntry
{
StackValue data;
StackEntry *below;
};
struct _Stack
{
StackEntry *top;
int size;
};
Stack *stack_new(void)
{
Stack *stack;
stack = (Stack *) ... | 7 |
SiliconLabs/wiseconnect-wifi-bt-wearable-sdk | 7f2e4ea | RSI_SDK_WEARABLES_v2.0/examples/COEX_MAX_DEMO_BLE_2MAS_8SLAV_69/lwipopts.h | C | www.github.com/SiliconLabs/wiseconnect-wifi-bt-wearable-sdk/tree/main/RSI_SDK_WEARABLES_v2.0/examples/COEX_MAX_DEMO_BLE_2MAS_8SLAV_69/lwipopts.h | https://raw.githubusercontent.com/SiliconLabs/wiseconnect-wifi-bt-wearable-sdk/7f2e4ea/RSI_SDK_WEARABLES_v2.0/examples/COEX_MAX_DEMO_BLE_2MAS_8SLAV_69/lwipopts.h | SiliconLabs/wiseconnect-wifi-bt-wearable-sdk 7f2e4ea RSI_SDK_WEARABLES_v2.0/examples/COEX_MAX_DEMO_BLE_2MAS_8SLAV_69/lwipopts.h | true | 200 | 50,113 | /****************************************************************************
* Copyright 2019, Silicon Laboratories Inc.
*
* 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://... | 4 |
Albertinesilva/legado-da-linguagem-c | c29c177 | linguagem_c_completa_descomplicada/lista_funcao/função_por_referencia/8°matriz_6_6_soma_diagonal_principal_e_secundaria/8°Matriz_6_6_SomaDiagonal_Principal_e_Secundaria.c | C | www.github.com/Albertinesilva/legado-da-linguagem-c/tree/main/linguagem_c_completa_descomplicada/lista_funcao/função_por_referencia/8°matriz_6_6_soma_diagonal_principal_e_secundaria/8°Matriz_6_6_SomaDiagonal_Principal_e_Secundaria.c | https://raw.githubusercontent.com/Albertinesilva/legado-da-linguagem-c/c29c177/linguagem_c_completa_descomplicada/lista_funcao/fun%C3%A7%C3%A3o_por_referencia/8%C2%B0matriz_6_6_soma_diagonal_principal_e_secundaria/8%C2%B0Matriz_6_6_SomaDiagonal_Principal_e_Secundaria.c | Albertinesilva/legado-da-linguagem-c c29c177 linguagem_c_completa_descomplicada/lista_funcao/função_por_referencia/8°matriz_6_6_soma_diagonal_principal_e_secundaria/8°Matriz_6_6_SomaDiagonal_Principal_e_Secundaria.c | true | 200 | 1,177 | #include <stdio.h>
#include <stdlib.h>
#include <time.h>
int Matriz_SomaDiagonal_Principal_e_Secundaria(int A[][6],int n,int *sPrincipal,int *sSecundaria);
void main()
{
srand(time(NULL));
int mat[6][6];
int Principal=0,Secundaria=0;
for(int l=0; l<6; l++)
{
for(int c=0; c<6; c++)
... | 2 |
psue04/Cpp | d4bfeba | 2-1/2/2.c | C | www.github.com/psue04/Cpp/tree/main/2-1/2/2.c | https://raw.githubusercontent.com/psue04/Cpp/d4bfeba/2-1/2/2.c | psue04/Cpp d4bfeba 2-1/2/2.c | true | 200 | 799 | #include <stdio.h>
typedef struct {
int xpos;
int ypos;
} Point;
Point getScale2xPoint(const Point* p) {
Point p_double;
p_double.xpos = p->xpos*2;
p_double.ypos = p->ypos*2;
return p_double;
}
void swapPoint(Point* p1, Point* p2) {
Point temp = *p1;
*p1 = *p2;
*p2 = tem... | 0 |
DipenGediya/-Filament | 4691d3c | email & password.c | C | www.github.com/DipenGediya/-Filament/tree/main/email & password.c | https://raw.githubusercontent.com/DipenGediya/-Filament/4691d3c/email%20%26%20password.c | DipenGediya/-Filament 4691d3c email & password.c | true | 200 | 553 | #include <stdio.h>
#include <string.h>
main()
{
char email[20];
char password[20];
printf("Enter your email : \n");
gets(email);
printf("Enter your password : \n");
gets(password);
if(strcmp(email,"4360dipengediya@gmail.com")==0)
{
printf("\n Correct E... | 5 |
hanselomondi/alx-low_level_programming | c02d99a | 0x14-bit_manipulation/5-flip_bits.c | C | www.github.com/hanselomondi/alx-low_level_programming/tree/main/0x14-bit_manipulation/5-flip_bits.c | https://raw.githubusercontent.com/hanselomondi/alx-low_level_programming/c02d99a/0x14-bit_manipulation/5-flip_bits.c | hanselomondi/alx-low_level_programming c02d99a 0x14-bit_manipulation/5-flip_bits.c | true | 200 | 738 | #include "main.h"
/**
* flip_bits - Evaluates the number of bits you would need to flip
* to get from one number to another
* @n: Number that is the starting point
* @m: The target value
*
* Return: The number of bits flipped to get from 'n' to 'm'
*/
unsigned int flip_bits(unsigned long int n, unsigned long in... | 6 |
kpatsakis/primevul6 | c987217 | 118952.c | C | www.github.com/kpatsakis/primevul6/tree/main/118952.c | https://raw.githubusercontent.com/kpatsakis/primevul6/c987217/118952.c | kpatsakis/primevul6 c987217 118952.c | true | 200 | 782 | static bool build_content(
ogs_sbi_http_message_t *http, ogs_sbi_message_t *message)
{
ogs_assert(message);
ogs_assert(http);
if (message->num_of_part) {
ogs_expect_or_return_val(true ==
build_multipart(http, message), false);
} else {
http->content = build_json(... | 1 |
kamicodaxe/alx-low_level_programming | 0c05ee3 | 0x01-variables_if_else_while/5-print_numbers.c | C | www.github.com/kamicodaxe/alx-low_level_programming/tree/main/0x01-variables_if_else_while/5-print_numbers.c | https://raw.githubusercontent.com/kamicodaxe/alx-low_level_programming/0c05ee3/0x01-variables_if_else_while/5-print_numbers.c | kamicodaxe/alx-low_level_programming 0c05ee3 0x01-variables_if_else_while/5-print_numbers.c | true | 200 | 205 | #include <stdio.h>
/**
* main - prints all numbers in base 10
* Return: 0
*/
int main(void)
{
int number;
for (number = 0; number <= 9; number++)
{
printf("%d", number);
}
printf("\n");
return (0);
}
| 3 |
Fuad-Khan/Algorithms-Design-Analysis | b932841 | C program/Linear Search.c | C | www.github.com/Fuad-Khan/Algorithms-Design-Analysis/tree/main/C program/Linear Search.c | https://raw.githubusercontent.com/Fuad-Khan/Algorithms-Design-Analysis/b932841/C%20program/Linear%20Search.c | Fuad-Khan/Algorithms-Design-Analysis b932841 C program/Linear Search.c | true | 200 | 681 | #include <stdio.h>
void main()
{
int n, i, key, a[100];
printf("Enter the number of elements in the array: ");
scanf("%d", &n);
printf("Enter the array elements: ");
for (i = 0; i < n; i++)
{
scanf("%d", &a[i]);
}
printf("Enter the item to be searched: ");
s... | 7 |
kushpatelj86/CSUF-Fall-2024-Part-6 | c36546b | virt_mem.c | C | www.github.com/kushpatelj86/CSUF-Fall-2024-Part-6/tree/main/virt_mem.c | https://raw.githubusercontent.com/kushpatelj86/CSUF-Fall-2024-Part-6/c36546b/virt_mem.c | kushpatelj86/CSUF-Fall-2024-Part-6 c36546b virt_mem.c | true | 200 | 7,120 | //
// virt_mem.c
// virt_mem
//
// On line 33 set FRAME_NUM to 256 to not used replacement policy, or 128 to use replacement policy
// On line 168 set replace_policy to 0 for FIFO or 1 for LRU
// On line 322 can uncomment assert if using FRAME_NUM of 256
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#incl... | 2 |
anuj7304/LB-Assignments | 47d0e7d | problem30_1.c | C | www.github.com/anuj7304/LB-Assignments/tree/main/problem30_1.c | https://raw.githubusercontent.com/anuj7304/LB-Assignments/47d0e7d/problem30_1.c | anuj7304/LB-Assignments 47d0e7d problem30_1.c | true | 200 | 793 | // Problem Statement :- Accept 2 strings from user and concate N characters of second string after first string. value of N should be accepted from user.
#include<stdio.h>
void StrNCat(char *str, char *ptr, int iNo)
{
while(*str != '\0')
{
str ++;
}
while((iNo != 0))
{
... | 0 |
MattiasDTU/Programmerings-Projekt-30010 | bf99ff2 | Project_source_files/design.c | C | www.github.com/MattiasDTU/Programmerings-Projekt-30010/tree/main/Project_source_files/design.c | https://raw.githubusercontent.com/MattiasDTU/Programmerings-Projekt-30010/bf99ff2/Project_source_files/design.c | MattiasDTU/Programmerings-Projekt-30010 bf99ff2 Project_source_files/design.c | true | 200 | 8,776 | /*
* design.c
*
* Created on: 10. jan. 2024
* Author: Matti
*/
#include <string.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <stdbool.h>
#include <unistd.h>
#include "system_stm32f30x.h"
#include "stm32f30x_conf.h"
#include "30010_io.h"
#include "Header_file.h"
void hideCursor() {pr... | 4 |
Secure-Embedded-Systems/attack-fame-pico | 97e4619 | PICO/cw-ascon/picoboot.c | C | www.github.com/Secure-Embedded-Systems/attack-fame-pico/tree/main/PICO/cw-ascon/picoboot.c | https://raw.githubusercontent.com/Secure-Embedded-Systems/attack-fame-pico/97e4619/PICO/cw-ascon/picoboot.c | Secure-Embedded-Systems/attack-fame-pico 97e4619 PICO/cw-ascon/picoboot.c | true | 200 | 2,001 | #include <stdint.h>
#include <string.h>
extern int __bootrom_start__;
extern int __bootrom_size__;
extern int __approm_start__;
extern int __approm_size__;
extern int __appram_start__;
extern int __appram_size__;
extern int __RAMSIZE__;
extern int __RAMAPPSIZE__;
#define reg_gpioctrl ((volatile uint32_t*)0x03800000) ... | 5 |
FPC-advanced/fpc-advanced-classroom-1st-year-assignment-khushi-222003 | 392be17 | set01/problem12.c | C | www.github.com/FPC-advanced/fpc-advanced-classroom-1st-year-assignment-khushi-222003/tree/main/set01/problem12.c | https://raw.githubusercontent.com/FPC-advanced/fpc-advanced-classroom-1st-year-assignment-khushi-222003/392be17/set01/problem12.c | FPC-advanced/fpc-advanced-classroom-1st-year-assignment-khushi-222003 392be17 set01/problem12.c | true | 200 | 1,169 | struct _complex {
float real;
float imaginary;
};
typedef struct _complex Complex;
int get_n() {
int n;
printf("Enter the size of complex:");
scanf("%d",&n);
return n;
}
void input_n_complex(int n,Complex p[n]) {
printf("Enter %d values for the array:\n", n);
for (int i = 0; i < n; i++) {
... | 6 |
stalengd/calc.c | 644b7d1 | src/command_line.c | C | www.github.com/stalengd/calc.c/tree/main/src/command_line.c | https://raw.githubusercontent.com/stalengd/calc.c/644b7d1/src/command_line.c | stalengd/calc.c 644b7d1 src/command_line.c | true | 200 | 1,409 | #include "command_line.h"
bool cliParseFlag(CliArguments args, CliCommand command) {
char* name = command.name;
int pos = cliFindArgumentPosition(args, name);
return pos > -1;
}
char* cliParseString(CliArguments args, CliCommand command) {
char* name = command.name;
int pos = cliFindArgumentPositi... | 1 |
FarmEquipment69/Fortnite-23.10-CL-23572221-SDK-Dump | c9b8e07 | EContentRequestInstallState.h | C | www.github.com/FarmEquipment69/Fortnite-23.10-CL-23572221-SDK-Dump/tree/main/EContentRequestInstallState.h | https://raw.githubusercontent.com/FarmEquipment69/Fortnite-23.10-CL-23572221-SDK-Dump/c9b8e07/EContentRequestInstallState.h | FarmEquipment69/Fortnite-23.10-CL-23572221-SDK-Dump c9b8e07 EContentRequestInstallState.h | true | 200 | 384 | // Enum /Script/FortniteGame.EContentRequestInstallState
enum class EContentRequestInstallState : uint8_t
{
None = 0,
Initialized = 1,
ManifestsBuilt = 2,
Installed = 3,
HostLoadedClientsInstalled = 4,
HostActiveClientsInstalled = 5,
Loaded = 6,
Active = 7,
ClientsUninstalled = 8,
Uninstalled = 9,
... | 3 |
loginsmruti/CppPractice | 1a96f08 | Daily OS/Day2/multipleexec1.c | C | www.github.com/loginsmruti/CppPractice/tree/main/Daily OS/Day2/multipleexec1.c | https://raw.githubusercontent.com/loginsmruti/CppPractice/1a96f08/Daily%20OS/Day2/multipleexec1.c | loginsmruti/CppPractice 1a96f08 Daily OS/Day2/multipleexec1.c | true | 200 | 642 | /*
pa
|
|
|___Pb executes ls
|
|
|___Pc executes pwd
|
|
|___Pd executes Mubinary...
*/
#include<stdio.h>
int main()
{
int i ,x ,counter ,cpid[3];
char *arg0[] = {"gcc","-o","out","./fun.c","-w",NULL};
char *arg1[] = {"./out",NULL};
char *arg2[] = {"pwd",NULL};
char *arg3[] = {"l... | 2 |
neuqrm/neuq_rm | d1c68ca | 步兵/步兵比赛代码/Infantry - 比赛4号-升级/APP/motor.h | C | www.github.com/neuqrm/neuq_rm/tree/main/步兵/步兵比赛代码/Infantry - 比赛4号-升级/APP/motor.h | https://raw.githubusercontent.com/neuqrm/neuq_rm/d1c68ca/%E6%AD%A5%E5%85%B5/%E6%AD%A5%E5%85%B5%E6%AF%94%E8%B5%9B%E4%BB%A3%E7%A0%81/Infantry%20-%20%E6%AF%94%E8%B5%9B4%E5%8F%B7-%E5%8D%87%E7%BA%A7/APP/motor.h | neuqrm/neuq_rm d1c68ca 步兵/步兵比赛代码/Infantry - 比赛4号-升级/APP/motor.h | true | 200 | 1,910 | #ifndef __MOTOR_H
#define __MOTOR_H
#include "bsp_basic_tim.h"
#include "bsp_advance_tim.h"
#include "CAN_receive.h"
#include "debug.h"
#include "motion.h"
#include "basicdata.h"
#include "imu.h"
#include "pid.h"
#include "filter.h"
typedef struct
{
int16 MoterID1_rpm;
int16 MoterID2_rpm;
int16 MoterID3_rpm;
int... | 7 |
sidharthmprasanth/c-programs | 57d0740 | 11-11-24/sum-of-n-natural-number/main.c | C | www.github.com/sidharthmprasanth/c-programs/tree/main/11-11-24/sum-of-n-natural-number/main.c | https://raw.githubusercontent.com/sidharthmprasanth/c-programs/57d0740/11-11-24/sum-of-n-natural-number/main.c | sidharthmprasanth/c-programs 57d0740 11-11-24/sum-of-n-natural-number/main.c | true | 200 | 711 | /******************************************************************************
Welcome to GDB Online.
GDB online is an online compiler and debugger tool for C, C++, Python, Java, PHP, Ruby, Perl,
C#, OCaml, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog.
Code, Compile, Run a... | 0 |
picocomputer/rp6502 | a2b9ab7 | src/ria/sys/mem.h | C | www.github.com/picocomputer/rp6502/tree/main/src/ria/sys/mem.h | https://raw.githubusercontent.com/picocomputer/rp6502/a2b9ab7/src/ria/sys/mem.h | picocomputer/rp6502 a2b9ab7 src/ria/sys/mem.h | true | 200 | 1,196 | /*
* Copyright (c) 2023 Rumbledethumps
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef _MEM_H_
#define _MEM_H_
#include <stddef.h>
#include <stdint.h>
#include <stdbool.h>
// 64KB Extended RAM
#ifdef NDEBUG
extern uint8_t xram[0x10000];
#else
extern uint8_t *const xram;
#endif
// The xstack is:
// 512 byte... | 4 |
hgarduno/Software | ab6c51a | ActualizaAplicacion/Servidor/C/Procesa.c | C | www.github.com/hgarduno/Software/tree/main/ActualizaAplicacion/Servidor/C/Procesa.c | https://raw.githubusercontent.com/hgarduno/Software/ab6c51a/ActualizaAplicacion/Servidor/C/Procesa.c | hgarduno/Software ab6c51a ActualizaAplicacion/Servidor/C/Procesa.c | true | 200 | 773 | #include <stdio.h>
#include <unistd.h>
#include <SiscomDesarrollo2.h>
#include <Procesa.h>
#include <ActualizaAplicacion.h>
#include <errno.h>
int erno;
int main(int pintArgc,
char **pchrPtrArgv)
{
int lintSocket=atoi(pchrPtrArgv[1]);
char lchrArrBuffer[5];
char *lchrPtrOperacion;
int lintContador;
SSisco... | 5 |
vladanaa1/kvm-hypervisor | 46d0b0f | host.c | C | www.github.com/vladanaa1/kvm-hypervisor/tree/main/host.c | https://raw.githubusercontent.com/vladanaa1/kvm-hypervisor/46d0b0f/host.c | vladanaa1/kvm-hypervisor 46d0b0f host.c | true | 200 | 27,916 | #include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <stdlib.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <linux/kvm.h>
#include <string.h>
#include <errno.h>
#include <inttypes.h>
#include <pthread.h>
#include <getopt.h>
#include <pty.h>
#include <semaphore.h>
// Define constants for file op... | 6 |
Edwardemamuzo/alx-low_level_programming | 14d9147 | 0x01-variables_if_else_while/8-print_base16.c | C | www.github.com/Edwardemamuzo/alx-low_level_programming/tree/main/0x01-variables_if_else_while/8-print_base16.c | https://raw.githubusercontent.com/Edwardemamuzo/alx-low_level_programming/14d9147/0x01-variables_if_else_while/8-print_base16.c | Edwardemamuzo/alx-low_level_programming 14d9147 0x01-variables_if_else_while/8-print_base16.c | true | 200 | 305 | #include <stdio.h>
#include <stdlib.h>
#include <time.h>
/**
* main - Entry point
*
* Return: Always 0 (Success)
*/
int main(void)
{
int d;
char low;
for (d = '0'; d <= '9'; d++)
putchar(d);
for (low = 'a'; low <= 'f'; low++)
putchar(low);
putchar('\n');
return (0);
}
| 1 |
pabloperez293/EjerciciosEnCparte1 | 7c005ac | 09-tiempOper.c | C | www.github.com/pabloperez293/EjerciciosEnCparte1/tree/main/09-tiempOper.c | https://raw.githubusercontent.com/pabloperez293/EjerciciosEnCparte1/7c005ac/09-tiempOper.c | pabloperez293/EjerciciosEnCparte1 7c005ac 09-tiempOper.c | true | 200 | 481 | /*09-ingresar el tiempo trabajado por un operario y considerando que el valor de
la hora es de 10 pesos, calcular su sueldo e imprimirlo */
#include <stdio.h>
int main(int argc, char *argv[]) {
//Definimos
int valHora = 10;
int tiemp = 0;
int sueldo;
printf(" ingrese el tiempo trabajado en... | 3 |
Migumar94/42-Projects | c32c1c4 | cub3d/src/game/frames.c | C | www.github.com/Migumar94/42-Projects/tree/main/cub3d/src/game/frames.c | https://raw.githubusercontent.com/Migumar94/42-Projects/c32c1c4/cub3d/src/game/frames.c | Migumar94/42-Projects c32c1c4 cub3d/src/game/frames.c | true | 200 | 2,472 | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* frames.c :+: :+: :+: ... | 7 |
Shahinurcodes/DSA1 | 8f68561 | InsertionSortPractice2.c | C | www.github.com/Shahinurcodes/DSA1/tree/main/InsertionSortPractice2.c | https://raw.githubusercontent.com/Shahinurcodes/DSA1/8f68561/InsertionSortPractice2.c | Shahinurcodes/DSA1 8f68561 InsertionSortPractice2.c | true | 200 | 921 | //Implement Insertion Sort, but instead of sorting the entire array,
//sort only the first k elements.
#include <stdio.h>
void Insertion_Sort(int arr[],int n,int k){
int j,temp;
for(int i=1;i<k;i++){
temp=arr[i];
j=i-1;
while(j>=0&&arr[j]>temp){
arr[j+1]=arr[j];
... | 2 |
shahriarsworld/C-Practice | 8ff4228 | report max num from three.c | C | www.github.com/shahriarsworld/C-Practice/tree/main/report max num from three.c | https://raw.githubusercontent.com/shahriarsworld/C-Practice/8ff4228/report%20max%20num%20from%20three.c | shahriarsworld/C-Practice 8ff4228 report max num from three.c | true | 200 | 452 | #include <stdio.h>
int main ()
{
int num1,num2,num3;
printf("Enter first number: ");
scanf("%d",&num1);
printf("Enter second number: ");
scanf("%d",&num2);
printf("Enter third number: ");
scanf("%d",&num3);
if (num1>num2)
{
printf("%d is the maximum number",num1);
}
else if (num2>num3)
{
pri... | 4 |
clarasb04/EDAII | ff9f67a | usuari.c | C | www.github.com/clarasb04/EDAII/tree/main/usuari.c | https://raw.githubusercontent.com/clarasb04/EDAII/ff9f67a/usuari.c | clarasb04/EDAII ff9f67a usuari.c | true | 200 | 7,595 | #include "estructures.h"
#include "main.h"
#include "play.h"
#include "usuari.h"
#include "publcacions.h"
#include <stdio.h>
#include "string.h"
#include <stdbool.h>
// Funció per a introduir els gustos d'un usuari, tractarem els gustos com un array de 0s i 1s
void crear_gustos(User* u){ //revisada
in... | 5 |
James-Khalil/CPSC355 | b9fea2d | CPSC355/Assignment 5/a5Main.c | C | www.github.com/James-Khalil/CPSC355/tree/main/CPSC355/Assignment 5/a5Main.c | https://raw.githubusercontent.com/James-Khalil/CPSC355/b9fea2d/CPSC355/Assignment%205/a5Main.c | James-Khalil/CPSC355 b9fea2d CPSC355/Assignment 5/a5Main.c | true | 200 | 2,543 | #include <stdio.h>
#include <stdlib.h>
/* Constants */
#define MAXOP 20
#define NUMBER '0'
#define TOOBIG '9'
/* Function prototypes */
int push(int f);
int pop();
void clear();
int getop(char *s, int lim);
int getch();
void ungetch(int c);
int main()
{
int type;
char s[MAXOP];
int op2;
while ((type... | 6 |
korichi23/printf | 7f1599b | _printf.c | C | www.github.com/korichi23/printf/tree/main/_printf.c | https://raw.githubusercontent.com/korichi23/printf/7f1599b/_printf.c | korichi23/printf 7f1599b _printf.c | true | 200 | 543 | #include "main.h"
/**
* _printf - prints anything
* @format:the format string
* Return:# of bytes printed
*/
int _printf(const char *format, ...)
{
int sum = 0;
va_list ap;
char *p, *start;
params_t params = PARAMS_INIT;
va_start(ap, format);
if (!format || (format[0] == '%' && !format[1]))
return (-1);
i... | 1 |
feyzijan/EmbeddedCLabs | f0d2cdb | Lab6_Motors&PWM/main.c | C | www.github.com/feyzijan/EmbeddedCLabs/tree/main/Lab6_Motors&PWM/main.c | https://raw.githubusercontent.com/feyzijan/EmbeddedCLabs/f0d2cdb/Lab6_Motors%26PWM/main.c | feyzijan/EmbeddedCLabs f0d2cdb Lab6_Motors&PWM/main.c | true | 200 | 2,116 | // CONFIG1L
#pragma config FEXTOSC = HS // External Oscillator mode Selection bits (HS (crystal oscillator) above 8 MHz; PFM set to high power)
#pragma config RSTOSC = EXTOSC_4PLL// Power-up default value for COSC bits (EXTOSC with 4x PLL, with EXTOSC operating per FEXTOSC bits)
// CONFIG3L
#pragma config WDTCPS =... | 3 |
jrvalverde/OS-VSTa | df4f543 | src/srv/namer/rcs/stat.c | C | www.github.com/jrvalverde/OS-VSTa/tree/main/src/srv/namer/rcs/stat.c | https://raw.githubusercontent.com/jrvalverde/OS-VSTa/df4f543/src/srv/namer/rcs/stat.c | jrvalverde/OS-VSTa df4f543 src/srv/namer/rcs/stat.c | true | 200 | 2,194 | head 1.4;
access;
symbols
V1_3_1:1.4
V1_3:1.4
V1_2:1.4
V1_1:1.4
V1_0:1.2;
locks; strict;
comment @ * @;
1.4
date 93.11.16.02.48.35; author vandys; state Exp;
branches;
next 1.3;
1.3
date 93.10.03.02.49.10; author vandys; state Exp;
branches;
next 1.2;
1.2
date 93.04.12.23.27.11; author vandys; state Exp;
branc... | 7 |
ashenafiDL/alx-low_level_programming | 400d522 | 0x04-more_functions_nested_loops/0-isupper.c | C | www.github.com/ashenafiDL/alx-low_level_programming/tree/main/0x04-more_functions_nested_loops/0-isupper.c | https://raw.githubusercontent.com/ashenafiDL/alx-low_level_programming/400d522/0x04-more_functions_nested_loops/0-isupper.c | ashenafiDL/alx-low_level_programming 400d522 0x04-more_functions_nested_loops/0-isupper.c | true | 200 | 219 | #include "main.h"
/**
* _isupper - checks for uppercase character
* @c: the character to be checked
* Return: 1 if c is uppercase.
* 0 otherwise
*/
int _isupper(int c)
{
return ((c >= 65 && c <= 90) ? 1 : 0);
}
| 2 |
VISHNU02V/networklab | 9a6c253 | exp4_udp/server/server.c | C | www.github.com/VISHNU02V/networklab/tree/main/exp4_udp/server/server.c | https://raw.githubusercontent.com/VISHNU02V/networklab/9a6c253/exp4_udp/server/server.c | VISHNU02V/networklab 9a6c253 exp4_udp/server/server.c | true | 200 | 1,256 | #include <stdio.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <string.h>
#include <arpa/inet.h>
#include <stdlib.h>
#define MAXLINE 1000
void main(){
int socketid,len;
char recline[2000],sendline[2000];
struct sockaddr_in server_addr,client_addr;
bzero(&recline,sizeof(server_addr));
bzero(&sendl... | 0 |
yodemisj/Desafios-de-Logica | 7a7a30e | Beecrowd/Iniciante/C/AcimaDaDiagonal.c | C | www.github.com/yodemisj/Desafios-de-Logica/tree/main/Beecrowd/Iniciante/C/AcimaDaDiagonal.c | https://raw.githubusercontent.com/yodemisj/Desafios-de-Logica/7a7a30e/Beecrowd/Iniciante/C/AcimaDaDiagonal.c | yodemisj/Desafios-de-Logica 7a7a30e Beecrowd/Iniciante/C/AcimaDaDiagonal.c | true | 200 | 520 | #include <stdio.h>
int main(){
int i,j;
float M[12][12], resultado = 0;
int inicioC = 1;
char operacao;
scanf(" %c",&operacao);
for(i = 0; i < 12; i++){
for(j = 0; j < 12; j++){
scanf("%f",&M[i][j]);
}
}
for(i = 0; i < 12; i++){
for(j = inicioC;... | 4 |
YohanIm00/2025_PLUM_C_Study | cc031d7 | Review/w_01/2_declaration.c | C | www.github.com/YohanIm00/2025_PLUM_C_Study/tree/main/Review/w_01/2_declaration.c | https://raw.githubusercontent.com/YohanIm00/2025_PLUM_C_Study/cc031d7/Review/w_01/2_declaration.c | YohanIm00/2025_PLUM_C_Study cc031d7 Review/w_01/2_declaration.c | true | 200 | 665 | /*
Declarations
1) All variables must be declared before they are used
2) You have to provide lists of all the variables
you use in a program and show which data type each variable is
3) Traditionally, variables must be declared at the beginning of a block
4) C99 and C11 allow us to place declarations anywhere ... | 6 |
Realme-GT-Neo-3/android_kernel_modules_oneplus_mt6895 | 2ec3c0a | mediatek/kernel_modules/gpu/gpu_mali/mali_valhall/mali-r38p1/drivers/gpu/arm/midgard/csf/mali_kbase_csf.c | C | www.github.com/Realme-GT-Neo-3/android_kernel_modules_oneplus_mt6895/tree/main/mediatek/kernel_modules/gpu/gpu_mali/mali_valhall/mali-r38p1/drivers/gpu/arm/midgard/csf/mali_kbase_csf.c | https://raw.githubusercontent.com/Realme-GT-Neo-3/android_kernel_modules_oneplus_mt6895/2ec3c0a/mediatek/kernel_modules/gpu/gpu_mali/mali_valhall/mali-r38p1/drivers/gpu/arm/midgard/csf/mali_kbase_csf.c | Realme-GT-Neo-3/android_kernel_modules_oneplus_mt6895 2ec3c0a mediatek/kernel_modules/gpu/gpu_mali/mali_valhall/mali-r38p1/drivers/gpu/arm/midgard/csf/mali_kbase_csf.c | true | 200 | 65,795 | // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
/*
*
* (C) COPYRIGHT 2018-2023 ARM Limited. All rights reserved.
*
* This program is free software and is provided to you under the terms of the
* GNU General Public License version 2 as published by the Free Software
* Foundation, and any use by you of ... | 5 |
Audience07/GetProcAddrByName | 85b5241 | main.c | C | www.github.com/Audience07/GetProcAddrByName/tree/main/main.c | https://raw.githubusercontent.com/Audience07/GetProcAddrByName/85b5241/main.c | Audience07/GetProcAddrByName 85b5241 main.c | true | 200 | 760 | #include "Head.h"
typedef (_stdcall *Plus)(int, int);
int main() {
//��dll,��ȡFileBuffer
LPVOID DLLFileBuffer = _vOpenFile("MyDLL.dll", 0);
Plus Plus1 = _GetFunctionAddrByName(DLLFileBuffer, "Div");
printf("%d", Plus1(10, 5));
//��ȡ�ؼ�PE�ؼ��ֶ�
//struct FileSign* pFileSign = malloc(sizeof(... | 1 |
jnkUHaFnir/human-vs-ai | acd396c | 5-3_specific-710/specific-710_294.c | C | www.github.com/jnkUHaFnir/human-vs-ai/tree/main/5-3_specific-710/specific-710_294.c | https://raw.githubusercontent.com/jnkUHaFnir/human-vs-ai/acd396c/5-3_specific-710/specific-710_294.c | jnkUHaFnir/human-vs-ai acd396c 5-3_specific-710/specific-710_294.c | true | 200 | 781 | #include <stdio.h>
#include <string.h>
int main()
{
#define GREEN 2
#define RED 3
char bands, color1[10], color2[10];
int mult = 0;
printf("Select how many bands the resistor has:\n");
printf("A. 4 bands\nB. 5 bands\nC. 6 bands\n");
scanf(" %c", &bands);
if (bands == 'A' || bands == ... | 7 |
AguuSz/Computacion-Grafica-2022 | 11a56b9 | tp_1/ejercicio2/otrosRenders.c | C | www.github.com/AguuSz/Computacion-Grafica-2022/tree/main/tp_1/ejercicio2/otrosRenders.c | https://raw.githubusercontent.com/AguuSz/Computacion-Grafica-2022/11a56b9/tp_1/ejercicio2/otrosRenders.c | AguuSz/Computacion-Grafica-2022 11a56b9 tp_1/ejercicio2/otrosRenders.c | true | 200 | 1,729 | #include <GL/glu.h>
#include <GL/glut.h>
#define MAX_WIDTH 640
#define MAX_HEIGHT 480
//<<<<<<<<<<<<< Inicialización >>>>>>>>>>>>>
void iniciar(void)
{
glClearColor(1.0, 1.0, 1.0, 0.0);
glColor3f(0.0f, 0.0f, 0.0f);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluOrtho2D(0.0, 640.0, 0.0, 480.0);
}
//<<<<<... | 3 |
MarH19/fast-image-quilting-for-texture-synthesis | c523ace | benchmarks/test.c | C | www.github.com/MarH19/fast-image-quilting-for-texture-synthesis/tree/main/benchmarks/test.c | https://raw.githubusercontent.com/MarH19/fast-image-quilting-for-texture-synthesis/c523ace/benchmarks/test.c | MarH19/fast-image-quilting-for-texture-synthesis c523ace benchmarks/test.c | true | 200 | 4,992 | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#ifndef WIN32
#include <sys/time.h>
#endif
#include <time.h>
#include "tsc_x86.h"
#include "image_quilting.h"
#define NUM_RUNS 1
#define CYCLES_REQUIRED 1e8
#define CALIBRATE
#include <assert.h>
double rdtsc(image_t in, int blocksize, int num_blocks, int overla... | 2 |
Bonaven123/alx-low_level_programming | fec3537 | 0x02-functions_nested_loops/3-islower.c | C | www.github.com/Bonaven123/alx-low_level_programming/tree/main/0x02-functions_nested_loops/3-islower.c | https://raw.githubusercontent.com/Bonaven123/alx-low_level_programming/fec3537/0x02-functions_nested_loops/3-islower.c | Bonaven123/alx-low_level_programming fec3537 0x02-functions_nested_loops/3-islower.c | true | 200 | 248 | #include "main.h"
/**
* _islower - checks for lowercase character
* * @c: The character to be checked.
* Return: 1 if character is lowercase, 0 otherwise.
*/
int _islower(int c)
{
if (c >= 'a' && c <= 'z')
return (1);
else
return (0);
}
| 0 |
IzMax91/Decimal | a675b33 | src/s21_sub.c | C | www.github.com/IzMax91/Decimal/tree/main/src/s21_sub.c | https://raw.githubusercontent.com/IzMax91/Decimal/a675b33/src/s21_sub.c | IzMax91/Decimal a675b33 src/s21_sub.c | true | 200 | 3,140 | #include "big_decimal.h"
int s21_sub(s21_decimal value_1, s21_decimal value_2, s21_decimal *result) {
s21_big_decimal big_value_1 = {{0, 0, 0, 0, 0, 0, 0, 0}};
s21_big_decimal big_value_2 = {{0, 0, 0, 0, 0, 0, 0, 0}};
s21_big_decimal big_result = {{0, 0, 0, 0, 0, 0, 0, 0}};
null_decimal(result);
dec... | 4 |
Abdelouafi09/alx-low_level_programming | 58bd57c | 0x06-pointers_arrays_strings/4-rev_array.c | C | www.github.com/Abdelouafi09/alx-low_level_programming/tree/main/0x06-pointers_arrays_strings/4-rev_array.c | https://raw.githubusercontent.com/Abdelouafi09/alx-low_level_programming/58bd57c/0x06-pointers_arrays_strings/4-rev_array.c | Abdelouafi09/alx-low_level_programming 58bd57c 0x06-pointers_arrays_strings/4-rev_array.c | true | 200 | 310 | #include "main.h"
/**
* reverse_array - function that reverses the content of an array of integers.
* @a: input array to reverse
* @n: size of the array
*/
void reverse_array(int *a, int n)
{
int t, i, h;
h = n / 2;
for (i = 0; i < h; i++)
{
t = a[i];
a[i] = a[n - 1];
a[n - 1] = t;
n--;
}
}
| 6 |
pathanyawarkhan785/leetcode | 9432273 | 1642_Furthest_Building_You_Can_Reach.c | C | www.github.com/pathanyawarkhan785/leetcode/tree/main/1642_Furthest_Building_You_Can_Reach.c | https://raw.githubusercontent.com/pathanyawarkhan785/leetcode/9432273/1642_Furthest_Building_You_Can_Reach.c | pathanyawarkhan785/leetcode 9432273 1642_Furthest_Building_You_Can_Reach.c | true | 200 | 1,663 | #include <stdio.h>
#include <stdlib.h>
void insertHeap(int *heap, int *size, int value)
{
heap[(*size)++] = value;
int i = *size - 1;
while (i > 0 && heap[i] < heap[(i - 1) / 2])
{
int temp = heap[i];
heap[i] = heap[(i - 1) / 2];
heap[(i - 1) / 2] = temp;
i = (i - 1) / 2... | 5 |
quyetcoder16/PRF192-fpt | 2ab1c3e | SE1940-HE186796-QuyetDX-WS1/SE1940-HE186796-QuyetDX-WS1/Q6.c | C | www.github.com/quyetcoder16/PRF192-fpt/tree/main/SE1940-HE186796-QuyetDX-WS1/SE1940-HE186796-QuyetDX-WS1/Q6.c | https://raw.githubusercontent.com/quyetcoder16/PRF192-fpt/2ab1c3e/SE1940-HE186796-QuyetDX-WS1/SE1940-HE186796-QuyetDX-WS1/Q6.c | quyetcoder16/PRF192-fpt 2ab1c3e SE1940-HE186796-QuyetDX-WS1/SE1940-HE186796-QuyetDX-WS1/Q6.c | true | 200 | 614 | /*
Date: 15/01/2024
Class: SE1940
RollNumber: HE186796
FullName: Duong Xuan Quyet
Question: 6
*/
//Import Library
#include <stdio.h>
//Main function
int main() {
// Input
float luong = 0;
printf("nhap muc luong ");
scanf("%f",&luong);
// Processing
//Output
if(luong>=100000000) printf("muc luong lanh da... | 3 |
ViniciusH97/Beecrowd-URI-exercicios | 63384a7 | C-C++/1017 - Gasto de Combustível.c | C | www.github.com/ViniciusH97/Beecrowd-URI-exercicios/tree/main/C-C++/1017 - Gasto de Combustível.c | https://raw.githubusercontent.com/ViniciusH97/Beecrowd-URI-exercicios/63384a7/C-C%2B%2B/1017%20-%20Gasto%20de%20Combust%C3%ADvel.c | ViniciusH97/Beecrowd-URI-exercicios 63384a7 C-C++/1017 - Gasto de Combustível.c | true | 200 | 185 | #include <stdio.h>
int main()
{
int T, VM, DP;
double L;
scanf("%d", &T);
scanf("%d", &VM);
DP = T * VM;
L = DP / 12.0;
printf("%.3lf\n", L);
return 0;
} | 7 |
Sourajit-M/Design-and-Analysis-of-Algorithms | b064bc5 | Assignment_2/floydAlgo.c | C | www.github.com/Sourajit-M/Design-and-Analysis-of-Algorithms/tree/main/Assignment_2/floydAlgo.c | https://raw.githubusercontent.com/Sourajit-M/Design-and-Analysis-of-Algorithms/b064bc5/Assignment_2/floydAlgo.c | Sourajit-M/Design-and-Analysis-of-Algorithms b064bc5 Assignment_2/floydAlgo.c | true | 200 | 1,017 | #include <stdio.h>
#define n 4
#define INF 999
void printMatrix(int matrix[][n]);
void floydWarshall(int graph[][n]) {
int matrix[n][n], i, j, k;
for (i = 0; i < n; i++)
for (j = 0; j < n; j++)
matrix[i][j] = graph[i][j];
for (k = 0; k < n; k++) {
for (i = 0; i < n; i++) {
f... | 2 |
devwizard64/rhc_troll2 | 6003e34 | shape/global/sand/gfx.c | C | www.github.com/devwizard64/rhc_troll2/tree/main/shape/global/sand/gfx.c | https://raw.githubusercontent.com/devwizard64/rhc_troll2/6003e34/shape/global/sand/gfx.c | devwizard64/rhc_troll2 6003e34 shape/global/sand/gfx.c | true | 200 | 585 | #include "gfx.vtx.h"
static u16 txt_sand[] =
{
#include "texture.rgba16.h"
};
Gfx gfx_sand[] =
{
gsDPPipeSync(),
gsSPClearGeometryMode(G_LIGHTING),
gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_DECALRGBA),
gsDPLoadTextureBlock(txt_sand, G_IM_FMT_RGBA, G_IM_SIZ_16b, 16, 16, 0, G_TX_CLAMP, G_TX_CLAMP, 4, 4, G_TX_NOLOD, G... | 0 |
Root-Exec/Droid-Quest | 3a510a0 | maps.c | C | www.github.com/Root-Exec/Droid-Quest/tree/main/maps.c | https://raw.githubusercontent.com/Root-Exec/Droid-Quest/3a510a0/maps.c | Root-Exec/Droid-Quest 3a510a0 maps.c | true | 200 | 11,072 | #include "droidFunctions.h"
#ifndef MAPS_H
#include "maps.h"
#endif
#include <time.h>
#include <unistd.h>
Node wall;
Node vert_door;
Node hori_door;
Node path;
Node power;
Node datapad;
extern Node Enemy;
extern Node Character;
extern int datapads;
int prevDoor[2];
int nextDoor[2];
int nextMap;
int prevMap;
int s... | 4 |
MihailBeloshapkin/mm-2023 | b033e53 | Fractal/src/fractal.c | C | www.github.com/MihailBeloshapkin/mm-2023/tree/main/Fractal/src/fractal.c | https://raw.githubusercontent.com/MihailBeloshapkin/mm-2023/b033e53/Fractal/src/fractal.c | MihailBeloshapkin/mm-2023 b033e53 Fractal/src/fractal.c | true | 200 | 1,545 | #include <assert.h>
#include <complex.h>
#include "image.h"
#include "fractal.h"
#include "custom_assert.h"
void draw_sierpinski_carpet(image_p picture, int x, int y, int size)
{
if (size < 1)
return;
int newSize = size / 3;
for (int i = 0; i < 3; i++) {
for (int j = 0; j < 3; j++) {
if (i == 1 &... | 6 |
YosefSamy019/learn_in_depth_workspace | 5beedd9 | unit_5/proj_2_student_manage_system/app/sceen_countStudents.c | C | www.github.com/YosefSamy019/learn_in_depth_workspace/tree/main/unit_5/proj_2_student_manage_system/app/sceen_countStudents.c | https://raw.githubusercontent.com/YosefSamy019/learn_in_depth_workspace/5beedd9/unit_5/proj_2_student_manage_system/app/sceen_countStudents.c | YosefSamy019/learn_in_depth_workspace 5beedd9 unit_5/proj_2_student_manage_system/app/sceen_countStudents.c | true | 200 | 1,063 | //
// Created by asus on 2024-07-02.
//
#include "navigator.h"
#include "input_output.h"
#include "../shared/delay_ms.h"
#include "../shared/models.h"
#include "../shared/debug.h"
#include "../data/linked_list.h"
SCREEN_DEFINE(SCREEN_countStudents) {
unsigned int count = 0;
printString("The total number of st... | 1 |
micahdbak/cmpt295-mini-project | 876f36a | src/heaps.c | C | www.github.com/micahdbak/cmpt295-mini-project/tree/main/src/heaps.c | https://raw.githubusercontent.com/micahdbak/cmpt295-mini-project/876f36a/src/heaps.c | micahdbak/cmpt295-mini-project 876f36a src/heaps.c | true | 200 | 779 | // heaps.c
#include "sorts.h"
#define PARENT(_i) ((_i-1)/2)
#define LCHILD(_i) ((2*_i)+1)
#define RCHILD(_i) ((2*_i)+2)
void bubble_down(uint64_t *arr, uint64_t length, uint64_t i) {
// bubble down
while (i < length) {
uint64_t c;
if (LCHILD(i) >= length)
break;
else
if (RCHILD(i) >= length)
c = ... | 7 |
Vokeh22/alx-low_level_programming | 4a12eeb | 0x01-variables_if_else_while/2-print_alphabet.c | C | www.github.com/Vokeh22/alx-low_level_programming/tree/main/0x01-variables_if_else_while/2-print_alphabet.c | https://raw.githubusercontent.com/Vokeh22/alx-low_level_programming/4a12eeb/0x01-variables_if_else_while/2-print_alphabet.c | Vokeh22/alx-low_level_programming 4a12eeb 0x01-variables_if_else_while/2-print_alphabet.c | true | 200 | 226 | #include <stdio.h>
/**
* main - Entry point of the program
*
* Return: Always 0 (Success)
*/
int main(void)
{
char c;
for (c = 'a'; c <= 'z'; ++c)
{
putchar(c);
if (c == 'z')
{
putchar('\n');
}
}
return (0);
}
| 5 |
S-Pz/Processamento-de-Caracteres | 435b717 | secondPart/main.c | C | www.github.com/S-Pz/Processamento-de-Caracteres/tree/main/secondPart/main.c | https://raw.githubusercontent.com/S-Pz/Processamento-de-Caracteres/435b717/secondPart/main.c | S-Pz/Processamento-de-Caracteres 435b717 secondPart/main.c | true | 200 | 2,730 | #include <stdlib.h>
#include <string.h>
#include "partTwo.h"
int main(int argc, char *argv[]){
FILE *ArqTxt = NULL, *ArqAlf = NULL;
FILE *ArqComprimdo = NULL;
TipoPalavra NomeArqTxt, NomeArqAlf, NomeArqComp, Opcao;
TipoPalavra aux;
memset(Opcao, 0, sizeof(Opcao));
while(Opcao[0] != 't'){
... | 2 |
iamniddi/baekjoon | 868d471 | c99/1912.c | C | www.github.com/iamniddi/baekjoon/tree/main/c99/1912.c | https://raw.githubusercontent.com/iamniddi/baekjoon/868d471/c99/1912.c | iamniddi/baekjoon 868d471 c99/1912.c | true | 200 | 304 | #include <stdio.h>
int main()
{
int n,i, buffer,sum = 0, max_sum = -1001;
scanf("%d", &n);
for (i = 0; i < n; i++){
scanf("%d", &buffer);
sum += buffer;
if (max_sum < sum){
max_sum = sum;
}
if (sum < 0){
sum = 0;
}
}
printf("%d", max_sum);
return 0;
}
| 0 |
afw-org/afw | 4ecc2b3 | src/afw/object/afw_object_type.c | C | www.github.com/afw-org/afw/tree/main/src/afw/object/afw_object_type.c | https://raw.githubusercontent.com/afw-org/afw/4ecc2b3/src/afw/object/afw_object_type.c | afw-org/afw 4ecc2b3 src/afw/object/afw_object_type.c | true | 200 | 7,036 | // See the 'COPYING' file in the project root for licensing information.
/*
* Adaptive Framework Object Type
*
* Copyright (c) 2010-2023 Clemson University
*
*/
/**
* @file afw_object_type.c
* @brief Object type helpers.
*/
#include "afw_internal.h"
static afw_object_type_property_type_t *
impl_create_prope... | 4 |
Elhattem/assiment2 | fc2dc93 | Assiment2.c | C | www.github.com/Elhattem/assiment2/tree/main/Assiment2.c | https://raw.githubusercontent.com/Elhattem/assiment2/fc2dc93/Assiment2.c | Elhattem/assiment2 fc2dc93 Assiment2.c | true | 200 | 2,502 | #include <stdio.h>
#include <string.h>
#define MAX_USERS 30
#define MAX_STRING_SIZE 100
struct User {
char user[MAX_STRING_SIZE];
char pass[MAX_STRING_SIZE];
union {
int active;
_Bool isActive;
};
};
struct User users[MAX_USERS];
int count = 0;
void clearInputBuffer() {
int c;
... | 6 |
HigorAnt/Snake-Game | 71e28d6 | game.c | C | www.github.com/HigorAnt/Snake-Game/tree/main/game.c | https://raw.githubusercontent.com/HigorAnt/Snake-Game/71e28d6/game.c | HigorAnt/Snake-Game 71e28d6 game.c | true | 200 | 2,639 | #include <stdio.h>
#include <stdlib.h>
#include <windows.h>
#include <conio.h>
#include <time.h>
int c[300][2], pontos=1, cx=2, cy=2, comida[2], velocidade=150;
char tecla;
void gotoxy(int x, int y) {
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE),(COORD){x,y});
}
void desenha() {
for(int i=0; i<po... | 1 |
Unix69/C_ADT_Datatypes | ca3743f | tipo item/tipo Item/ADT I cat - record (con stringa dinamica) - senza define/Item.c | C | www.github.com/Unix69/C_ADT_Datatypes/tree/main/tipo item/tipo Item/ADT I cat - record (con stringa dinamica) - senza define/Item.c | https://raw.githubusercontent.com/Unix69/C_ADT_Datatypes/ca3743f/tipo%20item/tipo%20Item/ADT%20I%20cat%20-%20record%20%28con%20stringa%20dinamica%29%20-%20senza%20define/Item.c | Unix69/C_ADT_Datatypes ca3743f tipo item/tipo Item/ADT I cat - record (con stringa dinamica) - senza define/Item.c | true | 200 | 1,427 | // Implementazione di Item record (con campo stringa e numero)
// la chiave e' la stringa
// Questa versione prevede il campo nome come striga dinamica
// che viene allocata al momento della lettura.
// si usa una stringa statica (vettore buf) per fare la lettura vera e propria
// da questa si passa all'allocazion... | 3 |
Prekaso/CECS-326 | 65ca637 | Assignment 3/slave.c | C | www.github.com/Prekaso/CECS-326/tree/main/Assignment 3/slave.c | https://raw.githubusercontent.com/Prekaso/CECS-326/65ca637/Assignment%203/slave.c | Prekaso/CECS-326 65ca637 Assignment 3/slave.c | true | 200 | 4,143 | #include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <fcntl.h>
#include <sys/shm.h>
#include <sys/stat.h>
#include <sys/mman.h>
#include <sys/types.h>
#include "myShm.h"
int main(int argc, char* argv[]) {
/*Before starting, make sure argument count is valid*/
if (argc >= 2) ... | 7 |
BartoszEff/ZastosowanieInformatykiwPlanowaniuProdukcji | 7d9a2a4 | DoPythona.c | C | www.github.com/BartoszEff/ZastosowanieInformatykiwPlanowaniuProdukcji/tree/main/DoPythona.c | https://raw.githubusercontent.com/BartoszEff/ZastosowanieInformatykiwPlanowaniuProdukcji/7d9a2a4/DoPythona.c | BartoszEff/ZastosowanieInformatykiwPlanowaniuProdukcji 7d9a2a4 DoPythona.c | true | 200 | 7,513 | #include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <limits.h>
#include <string.h>
#include <math.h>
// Funkcja generująca dane
void generuj_dane(int liczba_zadan, int liczba_maszyn, int *czasy_przetwarzania, int *typy_zadan, int *czasy_przezbrojen) {
for (int i = 0; i < liczba_zadan; i++) {
... | 2 |
DevMohi/C-Programming | 524d35b | Module 10.5/M_Replace_MinMax.c | C | www.github.com/DevMohi/C-Programming/tree/main/Module 10.5/M_Replace_MinMax.c | https://raw.githubusercontent.com/DevMohi/C-Programming/524d35b/Module%2010.5/M_Replace_MinMax.c | DevMohi/C-Programming 524d35b Module 10.5/M_Replace_MinMax.c | true | 200 | 933 | #include<stdio.h>
#include<limits.h>
int main(){
int n;
scanf("%d",&n);
int ar[n];
int min = INT_MAX;
int max = INT_MIN;
int pos,pos2;
for(int i=0; i<n; i++){
//taking inputs
scanf("%d",&ar[i]);
}
for(int i=0; i<n; i++){
// Minimun and max found
i... | 4 |
mr-ale141/ale141 | 59d2e54 | bc/USER/37.C | C | www.github.com/mr-ale141/ale141/tree/main/bc/USER/37.C | https://raw.githubusercontent.com/mr-ale141/ale141/59d2e54/bc/USER/37.C | mr-ale141/ale141 59d2e54 bc/USER/37.C | true | 200 | 2,499 | #include <stdlib.h>
#include <stdio.h>
#include <conio.h>
#include <string.h>
#include <math.h>
#include <alloc.h>
#include <time.h>
#define k 4
void Pr1(int A)
{
printf("%4d\n", A);
}
void Pr2(int A, char *B)
{
textcolor(A);
cprintf("%s", B);
}
void color(int a, int b)
{
textcolor(a);
... | 0 |
NickelannG/holbertonschool-low_level_programming | e6ad867 | structures_typedef/5-free_dog.c | C | www.github.com/NickelannG/holbertonschool-low_level_programming/tree/main/structures_typedef/5-free_dog.c | https://raw.githubusercontent.com/NickelannG/holbertonschool-low_level_programming/e6ad867/structures_typedef/5-free_dog.c | NickelannG/holbertonschool-low_level_programming e6ad867 structures_typedef/5-free_dog.c | true | 200 | 230 | #include "dog.h"
#include <stdio.h>
#include <stdlib.h>
/**
* free_dog - a function that frees dogs
*
* @d: a pointer to dog_t
*/
void free_dog(dog_t *d)
{
if (d != NULL)
{
free(d->name);
free(d->owner);
free(d);
}
}
| 6 |
fernandorego/feup-lcom-connect4 | 55efe85 | proj/src/lib/devices/rtc.c | C | www.github.com/fernandorego/feup-lcom-connect4/tree/main/proj/src/lib/devices/rtc.c | https://raw.githubusercontent.com/fernandorego/feup-lcom-connect4/55efe85/proj/src/lib/devices/rtc.c | fernandorego/feup-lcom-connect4 55efe85 proj/src/lib/devices/rtc.c | true | 200 | 3,031 | #include "rtc.h"
static char current_date[20];
static int rtc_hook_id;
int (rtc_subscribe_int)(uint8_t * bit_no) {
* bit_no = rtc_hook_id = RTC_IRQ;
uint8_t reg_c = 0;
if (rtc_read_register(RTC_REG_C, ®_c) != OK) {
printf("rtc_subscribe_int: rtc_read_register failed");
return !OK;
}
if (sys_irq... | 5 |
yvzang/DCS | 61f1da4 | demoVdecoder.c | C | www.github.com/yvzang/DCS/tree/main/demoVdecoder.c | https://raw.githubusercontent.com/yvzang/DCS/61f1da4/demoVdecoder.c | yvzang/DCS 61f1da4 demoVdecoder.c | true | 200 | 54,554 | /*
* Copyright (c) 2008-2016 Allwinner Technology Co. Ltd.
* All rights reserved.
*
* File : demoVdecoder.c
* Description : demoVdecoder
* History :
*
*/
#include <sys/ioctl.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <sys/time.h>
#include <openssl/sha.h>
#include <iniparserapi.h>
#i... | 1 |
Reuvenspitz/Assembler | 1119297 | main.c | C | www.github.com/Reuvenspitz/Assembler/tree/main/main.c | https://raw.githubusercontent.com/Reuvenspitz/Assembler/1119297/main.c | Reuvenspitz/Assembler 1119297 main.c | true | 200 | 633 | #include <stdio.h>
#include "assembler.h"
/**
* This is the main function of the program
* It gets the file names from the command line and sends them to the assembler
* @param argc the number of arguments
* @param argv the arguments
* @return 0 if the program ran successfully, -1 otherwise
*/
int main(int arg... | 3 |
drabiot/philosophers | 85a85ed | src/routine.c | C | www.github.com/drabiot/philosophers/tree/main/src/routine.c | https://raw.githubusercontent.com/drabiot/philosophers/85a85ed/src/routine.c | drabiot/philosophers 85a85ed src/routine.c | true | 200 | 2,826 | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* routine.c :+: :+: :+: ... | 7 |
h11322689/mesa | c58d5df | src/compiler/nir/nir_split_var_copies.c | C | www.github.com/h11322689/mesa/tree/main/src/compiler/nir/nir_split_var_copies.c | https://raw.githubusercontent.com/h11322689/mesa/c58d5df/src/compiler/nir/nir_split_var_copies.c | h11322689/mesa c58d5df src/compiler/nir/nir_split_var_copies.c | true | 200 | 4,382 | /*
* Copyright © 2014 Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, mod... | 4 |
cjn880805/ccjh | fc8f132 | npc/d/hengshan1_wuweiyi.h | C | www.github.com/cjn880805/ccjh/tree/main/npc/d/hengshan1_wuweiyi.h | https://raw.githubusercontent.com/cjn880805/ccjh/fc8f132/npc/d/hengshan1_wuweiyi.h | cjn880805/ccjh fc8f132 npc/d/hengshan1_wuweiyi.h | true | 200 | 1,181 | //wuweiyi.h
//code by zwb
//12-25
//inherit F_MASTER;
NPC_BEGIN(CNHengShan1_wuweiyi);
virtual void create()
{
set_name("����","wu wei yi");
set("foolid",144); set("gender", "����");
set("class", "swordsman");
set("age", 25);
set("attitude", "peaceful");
set... | 0 |
Chinwem/simple_shell | 952f326 | _strcpy.c | C | www.github.com/Chinwem/simple_shell/tree/main/_strcpy.c | https://raw.githubusercontent.com/Chinwem/simple_shell/952f326/_strcpy.c | Chinwem/simple_shell 952f326 _strcpy.c | true | 200 | 294 | #include "shell.h"
/**
* _strcpy - Copies strings
* @dest: Variable to copy to
* @src: Variable to copy from
* Return: Always copied string
*/
char *_strcpy(char *dest, char *src)
{
int n = 0;
while (src[n] != '\0')
{
dest[n] = src[n];
n++;
}
dest[n] = '\0';
return (dest);
}
| 2 |
kpatsakis/primevul5 | 87b7605 | 2461.c | C | www.github.com/kpatsakis/primevul5/tree/main/2461.c | https://raw.githubusercontent.com/kpatsakis/primevul5/87b7605/2461.c | kpatsakis/primevul5 87b7605 2461.c | true | 200 | 637 | R_API void r_io_bank_drain(RIO *io, const ut32 bankid) {
r_return_if_fail (io);
RIOBank *bank = r_io_bank_get (io, bankid);
if (!bank) {
return;
}
bank->last_used = NULL;
RRBNode *node = r_crbtree_first_node (bank->submaps);
RRBNode *next = NULL;
while (node) {
next = r_rbnode_next (node);
if (next) {
... | 6 |
manasranjanmohanta/C | 3a19936 | Section5/Experiment5_7.c | C | www.github.com/manasranjanmohanta/C/tree/main/Section5/Experiment5_7.c | https://raw.githubusercontent.com/manasranjanmohanta/C/3a19936/Section5/Experiment5_7.c | manasranjanmohanta/C 3a19936 Section5/Experiment5_7.c | true | 200 | 621 | /*a program to input a number and check whether it is palindrome or not (a
palindrome number is a number that remains the same when its digits are reversed, e.g., 16461)*/
#include <stdio.h>
#include <conio.h>
int main()
{
int num, num1, rev = 0, rem;
printf("\nEnter any number:");
scanf("%d", &num);
... | 1 |
BrunoASNascimento/ufabc_class_algorithms | 5723d3a | 58-maxHeap.c | C | www.github.com/BrunoASNascimento/ufabc_class_algorithms/tree/main/58-maxHeap.c | https://raw.githubusercontent.com/BrunoASNascimento/ufabc_class_algorithms/5723d3a/58-maxHeap.c | BrunoASNascimento/ufabc_class_algorithms 5723d3a 58-maxHeap.c | true | 200 | 1,596 | #include <stdio.h>
#include <stdlib.h>
typedef struct tHeap
{
int *v;
int tamanho;
int quantidade;
} Heap;
Heap *criaHeapVazio(int tam)
{
Heap *h = (Heap *)malloc(sizeof(Heap));
h->v = (int *)malloc(tam * sizeof(int));
h->tamanho = tam;
h->quantidade = 0;
return h;
}
void liberaHeap(H... | 5 |
hamrachi/push_swap | a1e00e2 | main.c | C | www.github.com/hamrachi/push_swap/tree/main/main.c | https://raw.githubusercontent.com/hamrachi/push_swap/a1e00e2/main.c | hamrachi/push_swap a1e00e2 main.c | true | 200 | 2,976 | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.c :+: :+: :+: ... | 0 |
er3mos/labwc-project | d038267 | src/labwc/src/ssd/ssd-titlebar.c | C | www.github.com/er3mos/labwc-project/tree/main/src/labwc/src/ssd/ssd-titlebar.c | https://raw.githubusercontent.com/er3mos/labwc-project/d038267/src/labwc/src/ssd/ssd-titlebar.c | er3mos/labwc-project d038267 src/labwc/src/ssd/ssd-titlebar.c | true | 200 | 17,972 | // SPDX-License-Identifier: GPL-2.0-only
#define _POSIX_C_SOURCE 200809L
#include <assert.h>
#include <string.h>
#include "buffer.h"
#include "config.h"
#include "common/mem.h"
#include "common/scaled-font-buffer.h"
#include "common/scaled-icon-buffer.h"
#include "common/scaled-img-buffer.h"
#include "common/scene-hel... | 2 |
ki-lang/ki | c6d36b7 | src/build/loop.c | C | www.github.com/ki-lang/ki/tree/main/src/build/loop.c | https://raw.githubusercontent.com/ki-lang/ki/c6d36b7/src/build/loop.c | ki-lang/ki c6d36b7 src/build/loop.c | true | 200 | 1,881 |
#include "../all.h"
void compile_loop(Build *b, int max_stage) {
Array *stages = array_make(b->alc, 20);
array_push(stages, b->stage_1);
array_push(stages, b->stage_2_1);
array_push(stages, b->stage_2_2);
array_push(stages, b->stage_2_3);
array_push(stages, b->stage_2_4);
array_push(stage... | 6 |
Tevin96/alx-low_level_programming | 45dd05f | 0x0E-structures_typedef/1-init_dog.c | C | www.github.com/Tevin96/alx-low_level_programming/tree/main/0x0E-structures_typedef/1-init_dog.c | https://raw.githubusercontent.com/Tevin96/alx-low_level_programming/45dd05f/0x0E-structures_typedef/1-init_dog.c | Tevin96/alx-low_level_programming 45dd05f 0x0E-structures_typedef/1-init_dog.c | true | 200 | 397 | #include "dog.h"
#include <stdlib.h>
/**
* init_dog - initialize a variable of type struct dog
* @d: pointer to struct dog
* @name: name of dog
* @age: age of dog
* @owner: owner of dog
* Return: 0 (success)
*/
void init_dog(struct dog *d, char *name, float age, char *owner)
{
if (d == NULL)
d = malloc(sizeof... | 3 |
ShanigaramPrashanth/Problem10_202217b3689 | a8bd38b | Problem10.c | C | www.github.com/ShanigaramPrashanth/Problem10_202217b3689/tree/main/Problem10.c | https://raw.githubusercontent.com/ShanigaramPrashanth/Problem10_202217b3689/a8bd38b/Problem10.c | ShanigaramPrashanth/Problem10_202217b3689 a8bd38b Problem10.c | true | 200 | 1,581 | #include <stdio.h>
/* Function to merge the subarrays of a[] */
void merge(int a[], int beg, int mid, int end) {
int i, j, k;
int n1 = mid - beg + 1;
int n2 = end - mid;
int LeftArray[n1], RightArray[n2]; //temporary arrays
/* copy data to temp arrays */
for (int i = 0; i < n1; i++)
LeftAr... | 7 |
Asare27/alx-low_level_programming | 314dffe | 0x01-variables_if_else_while/0-positive_or_negative.c | C | www.github.com/Asare27/alx-low_level_programming/tree/main/0x01-variables_if_else_while/0-positive_or_negative.c | https://raw.githubusercontent.com/Asare27/alx-low_level_programming/314dffe/0x01-variables_if_else_while/0-positive_or_negative.c | Asare27/alx-low_level_programming 314dffe 0x01-variables_if_else_while/0-positive_or_negative.c | true | 200 | 350 | #include <stdlib.h>
#include <time.h>
#include <stdio.h>
/**
* main - entry point
*
*Return:always return 0
*/
int main(void)
{
int n;
srand(time(0));
n = rand() - RAND_MAX / 2;
if (n > 0)
{
printf("%i is positive\n", n);
} else if (n == 0)
{
printf("%i is zero\n", n);
} else
{
printf("%i is negat... | 5 |
ayookuns1/alx-low_level_programming | 2b91ccf | 0x14-bit_manipulation/1-print_binary.c | C | www.github.com/ayookuns1/alx-low_level_programming/tree/main/0x14-bit_manipulation/1-print_binary.c | https://raw.githubusercontent.com/ayookuns1/alx-low_level_programming/2b91ccf/0x14-bit_manipulation/1-print_binary.c | ayookuns1/alx-low_level_programming 2b91ccf 0x14-bit_manipulation/1-print_binary.c | true | 200 | 466 | #include "main.h"
/**
* print_binary - Prints the binary representation of a number.
* @n: The number to be printed in binary format.
*/
void print_binary(unsigned long int n)
{
unsigned long int mask = 1UL << ((sizeof(unsigned long int) * 8) - 1);
int started = 0;
if (n == 0)
{
_putchar('0');
return;
}
... | 4 |
pgiovanazzi/computer-science-LCC | c35f8fe | EDyA/2016/TP 1 Listas/Eje 2/main.c | C | www.github.com/pgiovanazzi/computer-science-LCC/tree/main/EDyA/2016/TP 1 Listas/Eje 2/main.c | https://raw.githubusercontent.com/pgiovanazzi/computer-science-LCC/c35f8fe/EDyA/2016/TP%201%20Listas/Eje%202/main.c | pgiovanazzi/computer-science-LCC c35f8fe EDyA/2016/TP 1 Listas/Eje 2/main.c | true | 200 | 797 | #include <stdio.h>
#include "SList.h"
void printInt(int data, void *extra_data)
{
printf("%d ", data);
}
int genericCmp(const void *a, const void *b)
{
int fst = *(int *)a;
int scd = *(int *)b;
return fst - scd;
}
int main()
{
SList l1 = slist_nil(), l2 = slist_nil(), l3 = slist_nil();
l1 = slist_append(l1, 1)... | 0 |
cicerotcv/aps-logcomp-2 | ab5e659 | analyzer/y.tab.h | C | www.github.com/cicerotcv/aps-logcomp-2/tree/main/analyzer/y.tab.h | https://raw.githubusercontent.com/cicerotcv/aps-logcomp-2/ab5e659/analyzer/y.tab.h | cicerotcv/aps-logcomp-2 ab5e659 analyzer/y.tab.h | true | 200 | 3,408 | /* A Bison parser, made by GNU Bison 3.5.1. */
/* Bison interface for Yacc-like parsers in C
Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation,
Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as pub... | 2 |
panchev68-Janko/NewColor | a2eef85 | PROJECT/MID/TFT/tft_api.c | C | www.github.com/panchev68-Janko/NewColor/tree/main/PROJECT/MID/TFT/tft_api.c | https://raw.githubusercontent.com/panchev68-Janko/NewColor/a2eef85/PROJECT/MID/TFT/tft_api.c | panchev68-Janko/NewColor a2eef85 PROJECT/MID/TFT/tft_api.c | true | 200 | 12,263 | /**
********************************************************************************
@file tft_api.c
@brief tft_api.c Source Code
@author Bobby
@version 1
@date 12.12.2018
********************************************************************************
*/
#include "FreeRTOS.h"
#include "tas... | 6 |
Yashodhabeeraka/Batch17OCT2024_557 | ae54d48 | Assignments/day_08/loop5.c | C | www.github.com/Yashodhabeeraka/Batch17OCT2024_557/tree/main/Assignments/day_08/loop5.c | https://raw.githubusercontent.com/Yashodhabeeraka/Batch17OCT2024_557/ae54d48/Assignments/day_08/loop5.c | Yashodhabeeraka/Batch17OCT2024_557 ae54d48 Assignments/day_08/loop5.c | true | 200 | 199 | /*
Desp: 5. Refer the code below. It does not output anything.
Fix it.
*/
#include <stdio.h>
int main()
{
int x = 5;
while (x > 0)
{
printf( "Value of x :%d \n", x);
x--;
}
return 0;
}
| 3 |
Siddhesh-Hood/Siddhesh-Hood | 496d2ba | ResearchPrograms/program65.c | C | www.github.com/Siddhesh-Hood/Siddhesh-Hood/tree/main/ResearchPrograms/program65.c | https://raw.githubusercontent.com/Siddhesh-Hood/Siddhesh-Hood/496d2ba/ResearchPrograms/program65.c | Siddhesh-Hood/Siddhesh-Hood 496d2ba ResearchPrograms/program65.c | true | 200 | 538 | #include<stdio.h>
int Reverse(int iNo)
{
int iDigit = 0;
int iRev = 0;
if(iNo<0)
{
iNo = -iNo;
}
while (iNo >0)
{
iDigit = iNo %10;
iRev = (iRev *10) + iDigit;
iNo = iNo / 10;
}
return iRev;
}
int main()
{
int iVa... | 7 |
tkddn5623/2023_5-Semester | 8ea0f1e | SKKUcompetition2023/b solved.c | C | www.github.com/tkddn5623/2023_5-Semester/tree/main/SKKUcompetition2023/b solved.c | https://raw.githubusercontent.com/tkddn5623/2023_5-Semester/8ea0f1e/SKKUcompetition2023/b%20solved.c | tkddn5623/2023_5-Semester 8ea0f1e SKKUcompetition2023/b solved.c | true | 200 | 1,500 | #include <stdio.h>
#include <string.h>
#define MAXLEN (1000010)
void getline_(char* _Buffer) {
char* cp;
if (cp = strchr(fgets(_Buffer, MAXLEN, stdin), '\n')) *cp = '\0';
}
void printS(const char tok[]) {
const int len = strlen(tok);
int prev = 0;
for (int i = 0; tok[i] != '\0'; i++) {
char c;
swit... | 5 |
alibayomy/alx-low_level_programming | 99b207c | 0x01-variables_if_else_while/5-print_numbers.c | C | www.github.com/alibayomy/alx-low_level_programming/tree/main/0x01-variables_if_else_while/5-print_numbers.c | https://raw.githubusercontent.com/alibayomy/alx-low_level_programming/99b207c/0x01-variables_if_else_while/5-print_numbers.c | alibayomy/alx-low_level_programming 99b207c 0x01-variables_if_else_while/5-print_numbers.c | true | 200 | 238 | #include <stdio.h>
/**
* main - Entery point
*
* Description: print all numbers in 1 digit
*
* Return: always 0 (success)
*/
int main(void)
{
int n;
for (n = 0; n < 10; n++)
{
printf("%d", n);
}
printf("\n");
return (0);
}
| 1 |
priyanshusingh305/b2-assignment-priyanshu-singh | 696e189 | assignment 6/q2.c | C | www.github.com/priyanshusingh305/b2-assignment-priyanshu-singh/tree/main/assignment 6/q2.c | https://raw.githubusercontent.com/priyanshusingh305/b2-assignment-priyanshu-singh/696e189/assignment%206/q2.c | priyanshusingh305/b2-assignment-priyanshu-singh 696e189 assignment 6/q2.c | true | 200 | 176 | #include<stdio.h>
int main()
{
int n,sum=0,m;
printf("enter number");
scanf("%d",&n);
while(n>0)
{
m=n%10;
sum=sum+m;
n=n/10;
}
printf("%d",sum);
return 0;
}
| 4 |
devbojack/binary_trees | f6d75cf | 123-avl_remove.c | C | www.github.com/devbojack/binary_trees/tree/main/123-avl_remove.c | https://raw.githubusercontent.com/devbojack/binary_trees/f6d75cf/123-avl_remove.c | devbojack/binary_trees f6d75cf 123-avl_remove.c | true | 200 | 2,661 | #include "binary_trees.h"
void rem(avl_t **tree);
int par(bst_t *node);
int remove_type(bst_t *root);
bst_t *bst_remove(bst_t *root, int value);
/**
* avl_remove - removes a node from an AVL tree
* @root: pointer to the root node of the tree for removing a node
* @value: value to remove in the tree
*
* Return: t... | 0 |
JakubKordel/mini-mesh | b4d5fee | MeshDirectedDiffusion/InterfaceFunctions/include/meshSystemConfig.h | C | www.github.com/JakubKordel/mini-mesh/tree/main/MeshDirectedDiffusion/InterfaceFunctions/include/meshSystemConfig.h | https://raw.githubusercontent.com/JakubKordel/mini-mesh/b4d5fee/MeshDirectedDiffusion/InterfaceFunctions/include/meshSystemConfig.h | JakubKordel/mini-mesh b4d5fee MeshDirectedDiffusion/InterfaceFunctions/include/meshSystemConfig.h | true | 200 | 2,121 | #ifndef MESHSYSTEMCONFIG_H_
#define MESHSYSTEMCONFIG_H_
#define MAX_NEIGHBORS_NUM 32 // FIXED, it might be possible to change it to lower values (doesn't make much sense) but right now 32 is upper limit (uint32_t as mask for direct neighbors in system limits this number to 32, same with field related to thisi... | 2 |
Yash12gour/DSA-with-c-language | 4320e82 | Stack/REcursion/Nestedrecursion/main.c | C | www.github.com/Yash12gour/DSA-with-c-language/tree/main/Stack/REcursion/Nestedrecursion/main.c | https://raw.githubusercontent.com/Yash12gour/DSA-with-c-language/4320e82/Stack/REcursion/Nestedrecursion/main.c | Yash12gour/DSA-with-c-language 4320e82 Stack/REcursion/Nestedrecursion/main.c | true | 200 | 216 | #include <stdio.h>
#include <stdlib.h>
int fun(int n)
{
if(n>100)
return n-10;
return fun(fun(n+11));
}
int main()
{
int r;
r=fun(95);
printf("%d",r);
return 0;
}
| 7 |
Martin-do/alx-low_level_programming | f8548bf | 0x05-pointers_arrays_strings/8-print_array.c | C | www.github.com/Martin-do/alx-low_level_programming/tree/main/0x05-pointers_arrays_strings/8-print_array.c | https://raw.githubusercontent.com/Martin-do/alx-low_level_programming/f8548bf/0x05-pointers_arrays_strings/8-print_array.c | Martin-do/alx-low_level_programming f8548bf 0x05-pointers_arrays_strings/8-print_array.c | true | 200 | 300 | #include "main.h"
/**
* print_array - prints arra
* @a: array variable name
* @n: length of the array
*/
void print_array(int *a, int n)
{
int num = 0;
for (; num < n; num++)
{
if (num < n - 1)
{
printf("%d, ", a[num]);
}
else
{
printf("%d", a[num]);
}
}
printf("\n");
}
| 3 |
Chadkendu/alx-low_level_programming | 2b12323 | 0x17-doubly_linked_lists/4-free_dlistint.c | C | www.github.com/Chadkendu/alx-low_level_programming/tree/main/0x17-doubly_linked_lists/4-free_dlistint.c | https://raw.githubusercontent.com/Chadkendu/alx-low_level_programming/2b12323/0x17-doubly_linked_lists/4-free_dlistint.c | Chadkendu/alx-low_level_programming 2b12323 0x17-doubly_linked_lists/4-free_dlistint.c | true | 200 | 322 | #include "lists.h"
/**
* free_dlistint - frees a list
*
* Description:
* @head: pointer to head node
*/
void free_dlistint(dlistint_t *head)
{
dlistint_t *old, *new;
/* to keep of the track of node(s) when traversing */
old = head;
new = head;
while (new)
{
new = new->next;
free(old);
old = new;
}
... | 6 |
Donggle0315/Algorithm | bb60455 | 1920_수찾기.c | C | www.github.com/Donggle0315/Algorithm/tree/main/1920_수찾기.c | https://raw.githubusercontent.com/Donggle0315/Algorithm/bb60455/1920_%EC%88%98%EC%B0%BE%EA%B8%B0.c | Donggle0315/Algorithm bb60455 1920_수찾기.c | true | 200 | 1,513 | #define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <stdlib.h>
int* nlist;
int* mlist;
int n, m;
void init();
void finish();
void swap(int, int);
void quick(int, int);
int bin_search(int);
int main() {
int i,result;
init();
quick(0, n - 1);
for (i = 0; i < m; i++) {
result = bin_... | 5 |
amd/aocl-crypto | df7b23e | lib/compat/openssl/mac/alcp_cmac_prov.c | C | www.github.com/amd/aocl-crypto/tree/main/lib/compat/openssl/mac/alcp_cmac_prov.c | https://raw.githubusercontent.com/amd/aocl-crypto/df7b23e/lib/compat/openssl/mac/alcp_cmac_prov.c | amd/aocl-crypto df7b23e lib/compat/openssl/mac/alcp_cmac_prov.c | true | 200 | 7,887 | /*
* Copyright (C) 2023-2024, Advanced Micro Devices. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list... | 1 |
mohantyomm/my-project | 495130f | 01first.c | C | www.github.com/mohantyomm/my-project/tree/main/01first.c | https://raw.githubusercontent.com/mohantyomm/my-project/495130f/01first.c | mohantyomm/my-project 495130f 01first.c | true | 200 | 340 | #include <stdio.h>
/*
This is my first c programm and it was
succesfully runned.
IT is a multiline comment.
*/
int main()
{
int _tom;
int _Tom;
int error_code;
// Declaring variable as error code
// 'J' --> IS A CHARACTER
// It is a single line comment
printf("hello,i am learning c with harr... | 4 |
henry890112/Embedding_sys | a83d747 | socket_example/address/inet_aton_ex.c | C | www.github.com/henry890112/Embedding_sys/tree/main/socket_example/address/inet_aton_ex.c | https://raw.githubusercontent.com/henry890112/Embedding_sys/a83d747/socket_example/address/inet_aton_ex.c | henry890112/Embedding_sys a83d747 socket_example/address/inet_aton_ex.c | true | 200 | 698 | #include <stdio.h>
#include <stdlib.h>
#include <arpa/inet.h>
int main()
{
const char *addr1 = "8.8.8.8";
const char *addr2 = "192.168.1.256";
struct in_addr *naddr1 = (struct in_addr*)malloc(sizeof(struct in_addr));
struct in_addr *naddr2 = (struct in_addr*)malloc(sizeof(struct in_addr));
if (in... | 0 |
devkruz/alx-low_level_programming | e5e8354 | 0x13-more_singly_linked_lists/6-pop_listint.c | C | www.github.com/devkruz/alx-low_level_programming/tree/main/0x13-more_singly_linked_lists/6-pop_listint.c | https://raw.githubusercontent.com/devkruz/alx-low_level_programming/e5e8354/0x13-more_singly_linked_lists/6-pop_listint.c | devkruz/alx-low_level_programming e5e8354 0x13-more_singly_linked_lists/6-pop_listint.c | true | 200 | 394 | #include "lists.h"
/**
* pop_listint - deletes the head node of a list
* @head: the head of the list
*
* Return: the data of the deleted node
*/
int pop_listint(listint_t **head)
{
listint_t *node_head;
int rm_data;
node_head = *head;
if (node_head == NULL)
return (0);
rm_data = node_head->n;
*head = ... | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.