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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
zaira-carolina/Numerical-Methods | 59e5495 | Subspace/ej1.c | C | www.github.com/zaira-carolina/Numerical-Methods/tree/main/Subspace/ej1.c | https://raw.githubusercontent.com/zaira-carolina/Numerical-Methods/59e5495/Subspace/ej1.c | zaira-carolina/Numerical-Methods 59e5495 Subspace/ej1.c | true | 200 | 3,793 | #include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <time.h>
#include "funciones_iteracion.h"
#define PI 3.141592654
double dot_product_col_mat(int n, double **matriz, int col, int col2){
double suma = 0;
for (int i=0; i<n; i++){
suma += matriz[i][col]*matriz[i][col2];
... | 3 |
Tammycodez/alx-low_level_programming | 8fee4aa | 0x0C-more_malloc_free/101-mul.c | C | www.github.com/Tammycodez/alx-low_level_programming/tree/main/0x0C-more_malloc_free/101-mul.c | https://raw.githubusercontent.com/Tammycodez/alx-low_level_programming/8fee4aa/0x0C-more_malloc_free/101-mul.c | Tammycodez/alx-low_level_programming 8fee4aa 0x0C-more_malloc_free/101-mul.c | true | 200 | 541 | #include "main.h"
/**
* main - entry point, multiplies two
* positive numbers
* @argc: command line arguments
* @argv: args
* Return: 0 on success 98 on failure
*/
int main(int argc, char *argv[])
{
unsigned long mul;
int i, j;
if (argc != 3)
{
printf("Error\n");
exit(98);
}
for (i = 1; i < argc; i++... | 7 |
DoussangSebastien/my_radar | 9ad319a | test.c | C | www.github.com/DoussangSebastien/my_radar/tree/main/test.c | https://raw.githubusercontent.com/DoussangSebastien/my_radar/9ad319a/test.c | DoussangSebastien/my_radar 9ad319a test.c | true | 200 | 385 | /*
** EPITECH PROJECT, 2025
** my_radar
** File description:
** test.c
*/
#include "./include/radar.h"
sfSprite *loadsprite(char *filepath)
{
sfSprite *sprite;
sfTexture *texture;
if (!filepath)
return NULL;
sprite = sfSprite_create();
texture = sfTexture_createFromFile(filepath, NULL);... | 1 |
EJMarkle/holbertonschool-low_level_programming | e56990e | structures_typedef/2-print_dog.c | C | www.github.com/EJMarkle/holbertonschool-low_level_programming/tree/main/structures_typedef/2-print_dog.c | https://raw.githubusercontent.com/EJMarkle/holbertonschool-low_level_programming/e56990e/structures_typedef/2-print_dog.c | EJMarkle/holbertonschool-low_level_programming e56990e structures_typedef/2-print_dog.c | true | 200 | 313 | #include "dog.h"
#include "main.h"
/**
* print_dog - prints the dog struct
* @d: pointer to dog
*/
void print_dog(struct dog *d)
{
if (d != NULL)
{
printf("Name: %s\n", d->name != NULL ? d->name : "(nil)");
printf("Age: %.6f\n", d->age);
printf("Owner: %s\n", d->owner != NULL ? d->owner : "(nil)");
}
}
| 4 |
LeslieZhu007/farsight_dc22111_m5000m | 187adca | DataStructure/22111/.history/day07/half_search_20230102011157.c | C | www.github.com/LeslieZhu007/farsight_dc22111_m5000m/tree/main/DataStructure/22111/.history/day07/half_search_20230102011157.c | https://raw.githubusercontent.com/LeslieZhu007/farsight_dc22111_m5000m/187adca/DataStructure/22111/.history/day07/half_search_20230102011157.c | LeslieZhu007/farsight_dc22111_m5000m 187adca DataStructure/22111/.history/day07/half_search_20230102011157.c | true | 200 | 887 | #include <stdio.h>
//定义折半查找函数
int half_search(int *arr,int n,int key)
{
int low = 0;
int high = n-1;
while (low <= high)
{
int mid = (low + high)/2; //找到中间元素下标
if (arr[mid] == key)
{
return mid; //找到对应元素,将元素下标返回
} else if (key > arr[mid])
{
... | 6 |
Thuggonaut/42IC_Ring02_Fractol | ea084f1 | linux/src/render.c | C | www.github.com/Thuggonaut/42IC_Ring02_Fractol/tree/main/linux/src/render.c | https://raw.githubusercontent.com/Thuggonaut/42IC_Ring02_Fractol/ea084f1/linux/src/render.c | Thuggonaut/42IC_Ring02_Fractol ea084f1 linux/src/render.c | true | 200 | 1,412 | #include "../inc/fractol.h"
static void fractol_set(t_fractol *z, t_fractol *c, t_fractol *fract)
{
if (!ft_strncmp(fract->title, "Julia", 5))
{
c->cmplx_r = fract->julia_r;
c->cmplx_i = fract->julia_i;
}
else
{
c->cmplx_r = z->cmplx_r;
c->cmplx_i = z->cmplx_i;
}
}
static void ft_pixel_put(int x, int y,... | 2 |
likko-liu/fds | e0c5e0b | components/tof/src/i2c_drv.c | C | www.github.com/likko-liu/fds/tree/main/components/tof/src/i2c_drv.c | https://raw.githubusercontent.com/likko-liu/fds/e0c5e0b/components/tof/src/i2c_drv.c | likko-liu/fds e0c5e0b components/tof/src/i2c_drv.c | true | 200 | 2,754 | /**
* ESP-Drone Firmware
*
* Copyright 2019-2020 Espressif Systems (Shanghai)
* Copyright (c) 2014, Bitcraze AB, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Founda... | 0 |
zeng-xiao/RISC-V-disassembly-tools | 0858906 | src/elfParser/dumpDebugStrSection.c | C | www.github.com/zeng-xiao/RISC-V-disassembly-tools/tree/main/src/elfParser/dumpDebugStrSection.c | https://raw.githubusercontent.com/zeng-xiao/RISC-V-disassembly-tools/0858906/src/elfParser/dumpDebugStrSection.c | zeng-xiao/RISC-V-disassembly-tools 0858906 src/elfParser/dumpDebugStrSection.c | true | 200 | 850 | #include <stdio.h>
#include <stdlib.h>
#include "elf.h"
#include "dataOperate.h"
extern uint64_t shdrDebug_strOff;
extern uint64_t shdrDebug_strSize;
int dump_debug_str_section(const char *inputFileName) {
FILE *fileHandle = fopen(inputFileName, "rb");
fprintf(stderr, "\n\n");
fprintf(stderr, "Contents of se... | 3 |
Arielcito/Programacion_UNLA | 2b331c0 | Programacion 1/Actividad 6/Actividad6/Ejercicio13.c | C | www.github.com/Arielcito/Programacion_UNLA/tree/main/Programacion 1/Actividad 6/Actividad6/Ejercicio13.c | https://raw.githubusercontent.com/Arielcito/Programacion_UNLA/2b331c0/Programacion%201/Actividad%206/Actividad6/Ejercicio13.c | Arielcito/Programacion_UNLA 2b331c0 Programacion 1/Actividad 6/Actividad6/Ejercicio13.c | true | 200 | 1,098 | //13- Ingresar una cadena de caracteres e indicar si la misma es un pal�ndromo. Realizar esta
//operaci�n cuantas veces se desee, hasta que el usuario ingrese la cadena �SALIR�. Un
//pal�ndromo es una palabra que se lee igual de izquierda a derecha o de derecha a izquierda
#include <stdio.h>
#include <stdlib.h>
#includ... | 7 |
Ngochanako/MD014-C | b073820 | bai 7.c | C | www.github.com/Ngochanako/MD014-C/tree/main/bai 7.c | https://raw.githubusercontent.com/Ngochanako/MD014-C/b073820/bai%207.c | Ngochanako/MD014-C b073820 bai 7.c | true | 200 | 724 | #include<stdio.h>
int main(){
int n,m;
scanf("%d%d",&n,&m);
int arr1[n];
int arr2[m];
for(int i=0;i<n;i++){
printf("arr1[%d]=",i);
scanf("%d",&arr1[i]);
}
for(int i=0;i<m;i++){
printf("arr2[%d]=",i);
scanf("%d",&arr2[i]);
}
int new_arr[n+m];
int j=0;
for(int i=0;i<(n+m);i++){
if(... | 6 |
HichamTougri/projet-biblioth-que | 485a49f | fonctions.c | C | www.github.com/HichamTougri/projet-biblioth-que/tree/main/fonctions.c | https://raw.githubusercontent.com/HichamTougri/projet-biblioth-que/485a49f/fonctions.c | HichamTougri/projet-biblioth-que 485a49f fonctions.c | true | 200 | 6,063 | #include"Biblio.h"
int counter(FILE* file, char c) {
//it count the number of users registered in the program and return this number
rewind(file);
int nmb=0;
int l;
while(l!=EOF)
{
l = fgetc(file);
if(l == c){
nmb++;
}
}
return(nmb);
}
//make the list of user and return the length of the list
int ... | 4 |
navyanth-codes/DSA | bd7a94d | exponent using recursion.c | C | www.github.com/navyanth-codes/DSA/tree/main/exponent using recursion.c | https://raw.githubusercontent.com/navyanth-codes/DSA/bd7a94d/exponent%20using%20recursion.c | navyanth-codes/DSA bd7a94d exponent using recursion.c | true | 200 | 764 | #include<stdio.h>
int func(int m,int n)
{
if(n==0)
{
return 1;
}
if(n%2==0) // shortut recursion with less multies
{
return func(m*m,n/2);
}
else
{
return m*func(m*m,(n-1)/2);
}
}
int func2(int m,int n)
{
if(n==0)
{
... | 1 |
SUGHAN14/programs | bbae823 | semaphore.c | C | www.github.com/SUGHAN14/programs/tree/main/semaphore.c | https://raw.githubusercontent.com/SUGHAN14/programs/bbae823/semaphore.c | SUGHAN14/programs bbae823 semaphore.c | true | 200 | 848 | #include<stdio.h>
#include<stdlib.h>
int mutex=1,full=0,empty=3,x=0;
void producer();
void consumer();
void consumer();
int wait(int);
int signal(int);
int main(){
printf("\n 1.producer \n 2.consumer \n 3.exit \n");
while(1){
int n;
printf("\n enter your choice:");
scanf("%d",&n);
if(mutex==1){
switch(n){
case 1:
if(em... | 2 |
wshzoro/holbertonschool-printf | c577856 | _print_number.c | C | www.github.com/wshzoro/holbertonschool-printf/tree/main/_print_number.c | https://raw.githubusercontent.com/wshzoro/holbertonschool-printf/c577856/_print_number.c | wshzoro/holbertonschool-printf c577856 _print_number.c | true | 200 | 500 | #include "main.h"
/**
* p_int - print a interger
* @args: arguments
*
* Return: Number of characters printed
*/
int p_int(va_list args)
{
int n = va_arg(args, int);
int count = 0;
char buffer[11];
int index = 0;
unsigned int num;
if (n < 0)
{
_putchar('-');
count ++;
num = -n;
}
else
{
num = n;
}
if (num == 0)
{... | 5 |
Joaquintinsin/practicasIntroAlgoritmica | f8aef29 | Laboratorio/prop/repetidor.c | C | www.github.com/Joaquintinsin/practicasIntroAlgoritmica/tree/main/Laboratorio/prop/repetidor.c | https://raw.githubusercontent.com/Joaquintinsin/practicasIntroAlgoritmica/f8aef29/Laboratorio/prop/repetidor.c | Joaquintinsin/practicasIntroAlgoritmica f8aef29 Laboratorio/prop/repetidor.c | true | 200 | 421 | #include <stdio.h>
#include <string.h>
int main() {
char respuesta = 'n';
do{
printf ("Ingresar N o n si quiere salir. \n");
scanf ("%s", &respuesta);
while (getchar() != '\n');
// funcion que captura el caracter vacio. evita que el espacio sea otro scanf
} while (! ( ( respuesta=='N' ) || ( respuesta=='n'... | 0 |
nchinling/c_playground | 9194864 | basic/conditional.c | C | www.github.com/nchinling/c_playground/tree/main/basic/conditional.c | https://raw.githubusercontent.com/nchinling/c_playground/9194864/basic/conditional.c | nchinling/c_playground 9194864 basic/conditional.c | true | 200 | 388 | #include <stdio.h>
int main(void)
{
int age;
printf("Please enter your age: ");
scanf("%i", &age);
if (age < 18)
{
printf("You need to be over 18 years old to continue\n");
}
else if (age < 21)
{
printf("You need to be over 21\n");
}
else
{
printf(... | 3 |
edvanamente/llp-s1-telem | 5fbddf4 | Atividade5/questao4.c | C | www.github.com/edvanamente/llp-s1-telem/tree/main/Atividade5/questao4.c | https://raw.githubusercontent.com/edvanamente/llp-s1-telem/5fbddf4/Atividade5/questao4.c | edvanamente/llp-s1-telem 5fbddf4 Atividade5/questao4.c | true | 200 | 825 | #include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
int main() {
FILE *arq;
char nomeArq[30];
char caract;
int contVogais = 0;
int contConsoantes = 0;
printf("Digite o nome do arquivo: ");
scanf("%s", nomeArq);
arq = fopen(nomeArq, "r");
if (arq == NULL) {
printf("F... | 4 |
HagerIbrahem/C-Language_IMT_Assignments | 08907cb | lecture_2/Assign2.c | C | www.github.com/HagerIbrahem/C-Language_IMT_Assignments/tree/main/lecture_2/Assign2.c | https://raw.githubusercontent.com/HagerIbrahem/C-Language_IMT_Assignments/08907cb/lecture_2/Assign2.c | HagerIbrahem/C-Language_IMT_Assignments 08907cb lecture_2/Assign2.c | true | 200 | 854 | #include <stdio.h>
int main ()
{
int ID, ID1=123 ,ID2=345 ,ID3=567 ;
int Password ,Password1=123 ,Password2=345 ,Password3=567 ;
printf("Enter Your ID");
scanf("%d",&ID );
if(ID==ID1)
{
printf("Enter Your Password");
scanf(" %d",&Password );
if(Password ==Passwo... | 1 |
Mideas-Touch/alx-low_level_programming | c51fd5a | 0x0C-more_malloc_free/3-array_range.c | C | www.github.com/Mideas-Touch/alx-low_level_programming/tree/main/0x0C-more_malloc_free/3-array_range.c | https://raw.githubusercontent.com/Mideas-Touch/alx-low_level_programming/c51fd5a/0x0C-more_malloc_free/3-array_range.c | Mideas-Touch/alx-low_level_programming c51fd5a 0x0C-more_malloc_free/3-array_range.c | true | 200 | 432 | #include "main.h"
#include <stdlib.h>
/**
* array_range - prints an array of integers
* @min: minimum values
* @max: maximum values
* Return: pointer to the new array
*/
int *array_range(int min, int max)
{
int n, *arr;
if (min > max)
return (NULL);
arr = malloc(sizeof(int) * (max - min) + sizeof(int));
if... | 7 |
Rejoice2160/alx-low_level_programming | ff4ad73 | 0x0B-malloc_free/1-strdup.c | C | www.github.com/Rejoice2160/alx-low_level_programming/tree/main/0x0B-malloc_free/1-strdup.c | https://raw.githubusercontent.com/Rejoice2160/alx-low_level_programming/ff4ad73/0x0B-malloc_free/1-strdup.c | Rejoice2160/alx-low_level_programming ff4ad73 0x0B-malloc_free/1-strdup.c | true | 200 | 402 | #include <stdio.h>
#include <stdlib.h>
#include "main.h"
/**
* _strdup - duplicate to a new memory space location
* @str: char
* Return: 0
*/
char *_strdup(char *str)
{
char *aaa;
int i, b = 0;
if (str == NULL)
return (NULL);
i = 0;
while (str[i] != '\0')
i++;
aaa = malloc(sizeof(char) * (i + 1));
if (aaa ==... | 6 |
paulsunday/alx-low_level_programming | 9bda063 | 0x09-static_libraries/3-strcmp.c | C | www.github.com/paulsunday/alx-low_level_programming/tree/main/0x09-static_libraries/3-strcmp.c | https://raw.githubusercontent.com/paulsunday/alx-low_level_programming/9bda063/0x09-static_libraries/3-strcmp.c | paulsunday/alx-low_level_programming 9bda063 0x09-static_libraries/3-strcmp.c | true | 200 | 288 | #include "main.h"
#include <stdio.h>
/**
* _strcmp - Compares string
* @s1: string 1
* @s2: string 2
* Return: int
*/
int _strcmp(char *s1, char *s2)
{
while (((*s1 != '\0') && (*s2 != '\0')) && (*s1 == *s2))
{
s1++;
s2++;
}
if (*s1 == *s2)
{
return (0);
}
else
{
return (*s1 - *s2);
}
}
| 5 |
WazeAzure/Tubes-Alstrukdat | e14f7c7 | ADT/Kicauan/kicauan.c | C | www.github.com/WazeAzure/Tubes-Alstrukdat/tree/main/ADT/Kicauan/kicauan.c | https://raw.githubusercontent.com/WazeAzure/Tubes-Alstrukdat/e14f7c7/ADT/Kicauan/kicauan.c | WazeAzure/Tubes-Alstrukdat e14f7c7 ADT/Kicauan/kicauan.c | true | 200 | 6,144 | #include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include "../Wordmachine/charmachine.h"
#include "../Wordmachine/wordmachine.h"
// #include "../Datetime/datetime.h"
// #include "../User/user.h"
#include "kicauan.h"
#include "../../globalVar.h"
#define endl printf("\n")
void CreateLi... | 2 |
wavelet-lab/usdr-lib | 2a58453 | src/lib/lowlevel/libusb_vidpid_map.h | C | www.github.com/wavelet-lab/usdr-lib/tree/main/src/lib/lowlevel/libusb_vidpid_map.h | https://raw.githubusercontent.com/wavelet-lab/usdr-lib/2a58453/src/lib/lowlevel/libusb_vidpid_map.h | wavelet-lab/usdr-lib 2a58453 src/lib/lowlevel/libusb_vidpid_map.h | true | 200 | 2,280 | // Copyright (c) 2023-2024 Wavelet Lab
// SPDX-License-Identifier: MIT
//
// Created by irod on 29.01.24.
//
#ifndef _LIBUSB_VIDPID_MAP_H
#define _LIBUSB_VIDPID_MAP_H
#include <assert.h>
#include <string.h>
#include "../device/device_ids.h"
#define DEVICE_BUS_NAME_LEN 12
struct usb_pidvid_map {
uint16_t pid;
... | 0 |
jasmineH-D/alx-low_level_programming | fa5c766 | 0x02-functions_nested_loops/100-times_table.c | C | www.github.com/jasmineH-D/alx-low_level_programming/tree/main/0x02-functions_nested_loops/100-times_table.c | https://raw.githubusercontent.com/jasmineH-D/alx-low_level_programming/fa5c766/0x02-functions_nested_loops/100-times_table.c | jasmineH-D/alx-low_level_programming fa5c766 0x02-functions_nested_loops/100-times_table.c | true | 200 | 581 | #include "main.h"
/**
* print_times_table - prints the times table,
*@y: the vale of the times table.
* Return: Always 0.
*/
void print_times_table(int y)
{
int a, b, c;
if (y >= 0 && y <= 15)
{
for (a = 0; a <= y; a++)
{
_putchar('0');
for (b = 1; b <= y; b++)
{
_putchar(',');
_putchar(' ');
c = a * b;... | 3 |
shalini-thumma/Data-structures | e77228a | task 2 .2.c | C | www.github.com/shalini-thumma/Data-structures/tree/main/task 2 .2.c | https://raw.githubusercontent.com/shalini-thumma/Data-structures/e77228a/task%202%20.2.c | shalini-thumma/Data-structures e77228a task 2 .2.c | true | 200 | 535 | #include <stdio.h>
int main()
{
int n;
printf("enter the size of an array:");
scanf("%d",&n);
int arr[n];
printf("enter the elements of an array:\n");
for(int i=0;i<n;i++)
{
printf("enter a[%d] element ",i);
scanf("%d",&arr[i]);
}
printf("\nentered ar... | 4 |
RobCTs/IoT_Signal_analysis | d66c6c0 | components/components/mbedtls/mbedtls/library/psa_crypto_aead.c | C | www.github.com/RobCTs/IoT_Signal_analysis/tree/main/components/components/mbedtls/mbedtls/library/psa_crypto_aead.c | https://raw.githubusercontent.com/RobCTs/IoT_Signal_analysis/d66c6c0/components/components/mbedtls/mbedtls/library/psa_crypto_aead.c | RobCTs/IoT_Signal_analysis d66c6c0 components/components/mbedtls/mbedtls/library/psa_crypto_aead.c | true | 200 | 23,455 | /*
* PSA AEAD entry points
*/
/*
* Copyright The Mbed TLS Contributors
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
*/
#include "common.h"
#if defined(MBEDTLS_PSA_CRYPTO_C)
#include "psa_crypto_aead.h"
#include "psa_crypto_core.h"
#include "psa_crypto_cipher.h"
#include <string.... | 5 |
LailaTabourit/alx-low_level_programming | e713d72 | 0x1A-hash_tables/1-djb2.c | C | www.github.com/LailaTabourit/alx-low_level_programming/tree/main/0x1A-hash_tables/1-djb2.c | https://raw.githubusercontent.com/LailaTabourit/alx-low_level_programming/e713d72/0x1A-hash_tables/1-djb2.c | LailaTabourit/alx-low_level_programming e713d72 0x1A-hash_tables/1-djb2.c | true | 200 | 414 | #include "hash_tables.h"
/**
* hash_djb2 - function that gives you the index of a key.
* a string given (hash number)
*
* @str: string
* Return: the index at which the key/value stored in the hash table
*/
unsigned long int hash_djb2(const unsigned char *str)
{
unsigned long int hsh;
int c;
hsh = 5381;
whi... | 6 |
WhiteElephantGmbH/Open | 6cf2107 | eTpu/Projects/Set4/etpuc_acimvc.c | C | www.github.com/WhiteElephantGmbH/Open/tree/main/eTpu/Projects/Set4/etpuc_acimvc.c | https://raw.githubusercontent.com/WhiteElephantGmbH/Open/6cf2107/eTpu/Projects/Set4/etpuc_acimvc.c | WhiteElephantGmbH/Open 6cf2107 eTpu/Projects/Set4/etpuc_acimvc.c | true | 200 | 64,750 | /*******************************************************************************
*
* FREESCALE SEMICONDUCTOR INC. 2006
* ALL RIGHTS RESERVED
* COPYRIGHT (c)
*
********************************************************************************
*
* DESCRIPTION:
* The ACIMVC eTPU function performs the vector control cu... | 1 |
ALEENA-KT/ALEENAKT_SECTION-BAYESION-WAYS | 065e20e | Q3_ROCK PAPER SCISSOR.c | C | www.github.com/ALEENA-KT/ALEENAKT_SECTION-BAYESION-WAYS/tree/main/Q3_ROCK PAPER SCISSOR.c | https://raw.githubusercontent.com/ALEENA-KT/ALEENAKT_SECTION-BAYESION-WAYS/065e20e/Q3_ROCK%20PAPER%20SCISSOR.c | ALEENA-KT/ALEENAKT_SECTION-BAYESION-WAYS 065e20e Q3_ROCK PAPER SCISSOR.c | true | 200 | 2,161 | #include <stdio.h> // Include standard input-output library
// Function to determine the winner of a single round
char determineWinner(char player1, char player2) {
// Check if both players have the same move
if (player1 == player2) {
return 'D'; // Return 'D' for Draw
}
// Check if ... | 2 |
Essieng/C_Lang | 0184abe | prac6-3.c | C | www.github.com/Essieng/C_Lang/tree/main/prac6-3.c | https://raw.githubusercontent.com/Essieng/C_Lang/0184abe/prac6-3.c | Essieng/C_Lang 0184abe prac6-3.c | true | 200 | 1,334 | #include <stdio.h>
#pragma warning(disable:4996)
#define SIZE 10
void bubble(int*, const int, int (*)(int, int));
int ascending(const int, const int);
int descending(const int, const int);
void main() {
int a[SIZE] = { 2, 6, 4, 8, 10, 12, 89, 68, 45, 37 };
int counter, order;
printf("�������� ������ 1, �������� ��... | 7 |
vkyriakakis/compression-over-tcp | 3806179 | evaluation/measure_lib_perf.c | C | www.github.com/vkyriakakis/compression-over-tcp/tree/main/evaluation/measure_lib_perf.c | https://raw.githubusercontent.com/vkyriakakis/compression-over-tcp/3806179/evaluation/measure_lib_perf.c | vkyriakakis/compression-over-tcp 3806179 evaluation/measure_lib_perf.c | true | 200 | 17,626 | #define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <dlfcn.h>
#include <errno.h>
#include <time.h>
#include <sys/time.h>
#include <unistd.h>
#include <zlib.h>
// Compile with gcc -DBUF_SIZE=204800 -shared -fPIC measure_lib_perf.c -o me... | 0 |
diekleinekuh/BennuGD_libretro | 84c186a | modules/libkey/libkey.c | C | www.github.com/diekleinekuh/BennuGD_libretro/tree/main/modules/libkey/libkey.c | https://raw.githubusercontent.com/diekleinekuh/BennuGD_libretro/84c186a/modules/libkey/libkey.c | diekleinekuh/BennuGD_libretro 84c186a modules/libkey/libkey.c | true | 200 | 13,670 | /*
* Copyright © 2006-2019 SplinterGU (Fenix/Bennugd)
* Copyright © 2002-2006 Fenix Team (Fenix)
* Copyright © 1999-2002 José Luis Cebrián Pagüe (Fenix)
*
* This file is part of Bennu - Game Development
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the ... | 3 |
Hadihimself/alx-low_level_programming | 16cdd2c | 0x04-more_functions_nested_loops/3-print_numbers.c | C | www.github.com/Hadihimself/alx-low_level_programming/tree/main/0x04-more_functions_nested_loops/3-print_numbers.c | https://raw.githubusercontent.com/Hadihimself/alx-low_level_programming/16cdd2c/0x04-more_functions_nested_loops/3-print_numbers.c | Hadihimself/alx-low_level_programming 16cdd2c 0x04-more_functions_nested_loops/3-print_numbers.c | true | 200 | 233 | #include "main.h"
/**
* print_numbers - check the code for Holberton School students.
*
* Return: Always 0.
*/
void print_numbers(void)
{
int num;
for (num = '0'; num <= '9'; num++)
{
_putchar(num);
}
_putchar('\n');
}
| 4 |
brainface/havenmud | ae9eab3 | lib/domains/baria/areas/pyramid/npc/bat.c | C | www.github.com/brainface/havenmud/tree/main/lib/domains/baria/areas/pyramid/npc/bat.c | https://raw.githubusercontent.com/brainface/havenmud/ae9eab3/lib/domains/baria/areas/pyramid/npc/bat.c | brainface/havenmud ae9eab3 lib/domains/baria/areas/pyramid/npc/bat.c | true | 200 | 631 | /* */
//
// Creator: Angel Cazares - Rhakz
// Date: 09/18/98
// File Name: bat.c
// Area: the dark pyramid
//
#include <lib.h>
#include "../pyramid.h"
inherit LIB_NPC;
static void create() {
npc::create();
SetKeyName("filthy bat");
SetShort("a fi... | 7 |
sjeong12/Algorithm_study | 88d6a04 | sangguNa/11057_오르막수.c | C | www.github.com/sjeong12/Algorithm_study/tree/main/sangguNa/11057_오르막수.c | https://raw.githubusercontent.com/sjeong12/Algorithm_study/88d6a04/sangguNa/11057_%EC%98%A4%EB%A5%B4%EB%A7%89%EC%88%98.c | sjeong12/Algorithm_study 88d6a04 sangguNa/11057_오르막수.c | true | 200 | 1,650 | #include <stdio.h>
int n;
int dp[1001][10]; //dp[A][B] = C, A길이의 숫자에서 가장 마지막 숫자가 B일때, 가능한 오르막 수 갯수는 C개
int main(void)
{
scanf("%d", &n);
for(int i = 0; i < 10; i++) //1자리 수인 0 ~ 9는 그 자체로도 오르막 수가됨, 즉 전부 길이가 1이며, 가장 마지막 숫자
dp[1][i] = 1;
//2자리 이상부턴 마지막 숫자에 영향을 받음. 예를들어 dp[2][2]가 있을때 두자리 숫자면서 끝 숫자가 ... | 2 |
Hajar-Hafdi/alx-low_level_programming | 1b44660 | 0x0A-argc_argv/0-whatsmyname.c | C | www.github.com/Hajar-Hafdi/alx-low_level_programming/tree/main/0x0A-argc_argv/0-whatsmyname.c | https://raw.githubusercontent.com/Hajar-Hafdi/alx-low_level_programming/1b44660/0x0A-argc_argv/0-whatsmyname.c | Hajar-Hafdi/alx-low_level_programming 1b44660 0x0A-argc_argv/0-whatsmyname.c | true | 200 | 223 | #include <stdio.h>
/**
* main - prints program's name
*
* @argc: int
* @argv: list
*
* Return: Always 0 (Success)
*/
int main(int argc __attribute((unused)), char *argv[])
{
printf("%s\n", argv[0]);
return (0);
}
| 6 |
enock-jufri/alx-low_level_programming | d8336ee | 0x02-functions_nested_loops/5-sign.c | C | www.github.com/enock-jufri/alx-low_level_programming/tree/main/0x02-functions_nested_loops/5-sign.c | https://raw.githubusercontent.com/enock-jufri/alx-low_level_programming/d8336ee/0x02-functions_nested_loops/5-sign.c | enock-jufri/alx-low_level_programming d8336ee 0x02-functions_nested_loops/5-sign.c | true | 200 | 324 | #include "main.h"
/**
* print_sign - returns 1 if input is > 1, 0 if 0 and < 1 -1
*
* @n: input from main
*
* Return: 0,1,-1
*
*/
int print_sign(int n)
{
if (n > 0)
{
_putchar(43);
return (1);
}
else if (n < 0)
{
_putchar(45);
return (-1);
}
else
{
_putchar(48);
return (0);
}
_putchar('\n')... | 1 |
mahmoud-47/pointeurs-listes-chainees-arbres-en-C | 6c3574b | TD-TP-L2/test_point_fonc.c | C | www.github.com/mahmoud-47/pointeurs-listes-chainees-arbres-en-C/tree/main/TD-TP-L2/test_point_fonc.c | https://raw.githubusercontent.com/mahmoud-47/pointeurs-listes-chainees-arbres-en-C/6c3574b/TD-TP-L2/test_point_fonc.c | mahmoud-47/pointeurs-listes-chainees-arbres-en-C 6c3574b TD-TP-L2/test_point_fonc.c | true | 200 | 408 | #include <stdio.h>
#include<stdlib.h>
int carre(int n){
return n*n;
}
void affiche_carre(int i){
printf("%d ",i*i);
}
void map(int t[],int n,void(*f)(int)){
for(int i=0;i<n;i++)
(*f)(t[i]);
}
int main(){
int(*f)(int);
f=carre;
int n,t[5]={1,2,3,4,5};
printf("Donner un nombre ");
scanf("%d",&n);
printf("L... | 0 |
kpatsakis/primevul8 | 48df1b0 | 169454.c | C | www.github.com/kpatsakis/primevul8/tree/main/169454.c | https://raw.githubusercontent.com/kpatsakis/primevul8/48df1b0/169454.c | kpatsakis/primevul8 48df1b0 169454.c | true | 200 | 429 | drop_root_privileges(const char *username)
{
struct passwd *pw = NULL;
pw = getpwnam(username);
if (pw) {
if (initgroups(username, pw->pw_gid) != 0 || setgid(pw->pw_gid) != 0 || setuid(pw->pw_uid) != 0) {
flog(LOG_ERR, "Couldn't change to '%.32s' uid=%d gid=%d",
username, pw->pw_uid, pw->pw_gid);
return... | 4 |
ChoiJangSeop/DiverseVul-non-vuln-codes | 47882db | c16910.c | C | www.github.com/ChoiJangSeop/DiverseVul-non-vuln-codes/tree/main/c16910.c | https://raw.githubusercontent.com/ChoiJangSeop/DiverseVul-non-vuln-codes/47882db/c16910.c | ChoiJangSeop/DiverseVul-non-vuln-codes 47882db c16910.c | true | 200 | 1,739 | static void endElementHandler(void *userData, const char *name)
{
userdata_t *ud = (userdata_t *) userData;
if (strcmp(name, "graph") == 0) {
pop_subg();
popString(&ud->elements);
ud->closedElementType = TAG_GRAPH;
} else if (strcmp(name, "node") == 0) {
char *ele_name = topString(ud->elements);
if (u... | 7 |
Ladydee3/simple_shells | 962ec52 | main.c | C | www.github.com/Ladydee3/simple_shells/tree/main/main.c | https://raw.githubusercontent.com/Ladydee3/simple_shells/962ec52/main.c | Ladydee3/simple_shells 962ec52 main.c | true | 200 | 724 | #include "shell.h"
/**
* main - The entry point
* @argc: the arg count
* @argv: the arg vector
* Return: Always 0 (success), or 1 on error
*/
int main(int argc, char **argv)
{
info_t info[] = {"INFO_INIT"};
int fd = 2;
asm ("mov %1, %0\n\t"
"add $3, %0"
: "=c" (fd)
: "c" (fd));
if (argc == 2)
{
... | 5 |
CatAraujoo/42_Exams | bc4c2bd | Rank 2/Level 3/add_prime_sum.c | C | www.github.com/CatAraujoo/42_Exams/tree/main/Rank 2/Level 3/add_prime_sum.c | https://raw.githubusercontent.com/CatAraujoo/42_Exams/bc4c2bd/Rank%202/Level%203/add_prime_sum.c | CatAraujoo/42_Exams bc4c2bd Rank 2/Level 3/add_prime_sum.c | true | 200 | 2,292 | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* add_prime_sum.c :+: :+: :+: ... | 3 |
madbunny253/SPPU-TE-IT-OS | e734ede | pagereplacement.c | C | www.github.com/madbunny253/SPPU-TE-IT-OS/tree/main/pagereplacement.c | https://raw.githubusercontent.com/madbunny253/SPPU-TE-IT-OS/e734ede/pagereplacement.c | madbunny253/SPPU-TE-IT-OS e734ede pagereplacement.c | true | 200 | 4,163 | #include <stdio.h>
#include <stdlib.h>
void printFrames(int frames[], int frameSize) {
for (int i = 0; i < frameSize; ++i)
{
if (frames[i] == -1)
{
printf("X ");
}
else
{
printf("%d ", frames[i]);
}
}
printf("\n"... | 6 |
liujf69/Socket-Programming | e3cec25 | Chapter13/peek_recv.c | C | www.github.com/liujf69/Socket-Programming/tree/main/Chapter13/peek_recv.c | https://raw.githubusercontent.com/liujf69/Socket-Programming/e3cec25/Chapter13/peek_recv.c | liujf69/Socket-Programming e3cec25 Chapter13/peek_recv.c | true | 200 | 1,759 | // gcc peek_recv.c -o peek_recv
// ./peek_recv 9190
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#define BUF_SIZE 30
void error_handling(char *message){
fputs(message, stderr);
fputc('\n', stderr);
exit(1);
}
int main(int a... | 1 |
ihiiro/1337_piscine | ade970b | day02/204/ft_print_comb.c | C | www.github.com/ihiiro/1337_piscine/tree/main/day02/204/ft_print_comb.c | https://raw.githubusercontent.com/ihiiro/1337_piscine/ade970b/day02/204/ft_print_comb.c | ihiiro/1337_piscine ade970b day02/204/ft_print_comb.c | true | 200 | 1,217 | #include <unistd.h>
void ft_putchar(char c)
{
write(1, &c, 1);
}
void ft_print_comb(void);
int main()
{
ft_print_comb();
}
void ft_print_comb(void)
{
void iter(char one, char two, char three, char root_one, char root_two, char root_three)
{
// helper
void display(int comma)
{
if (comma)
{
ft_pu... | 0 |
Infineon/mtb-example-fx2g3-flash-loader | ddf3c55 | usb_descriptors.c | C | www.github.com/Infineon/mtb-example-fx2g3-flash-loader/tree/main/usb_descriptors.c | https://raw.githubusercontent.com/Infineon/mtb-example-fx2g3-flash-loader/ddf3c55/usb_descriptors.c | Infineon/mtb-example-fx2g3-flash-loader ddf3c55 usb_descriptors.c | true | 200 | 10,054 | /***************************************************************************//**
* \file usb_descriptors.c
* \version 1.0
*
* Defines the USB descriptors used in the USB flash loader application.
*
*******************************************************************************
* \copyright
* (c) (2024), Cypress Semicon... | 2 |
comand3rwin/pcto-luiss | 5eb39e4 | comand.c | C | www.github.com/comand3rwin/pcto-luiss/tree/main/comand.c | https://raw.githubusercontent.com/comand3rwin/pcto-luiss/5eb39e4/comand.c | comand3rwin/pcto-luiss 5eb39e4 comand.c | true | 200 | 927 | #include <stdio.h>
VARIABILI
int main()
{
int numero = 42;
int pari = 56;
double numerolungo = 544444444;
float numeroconlavirgola = 5.76;
char carattere = 'C';
printf("in numero e %d\n", pari);
printf("il carattere%c\n", carattere);
printf("numero lungo %f,\n numero con l virgola %f\... | 4 |
nikhilmangali1/code | bb1328a | c programs/array2.c | C | www.github.com/nikhilmangali1/code/tree/main/c programs/array2.c | https://raw.githubusercontent.com/nikhilmangali1/code/bb1328a/c%20programs/array2.c | nikhilmangali1/code bb1328a c programs/array2.c | true | 200 | 689 | #include<stdio.h>
#include<stdlib.h>
struct array
{
int *ap;
int size;
int length;
};
void display(struct array );
int main()
{
struct array a;
int i,n;
printf("\nENter the size of the array:");
scanf("%d",&a.size);
a.ap=(int*)malloc(a.size*sizeof(int));
a.length=0;
printf("\nEnt... | 5 |
kosyan62/override | 642f16f | level03/Resources/script.c | C | www.github.com/kosyan62/override/tree/main/level03/Resources/script.c | https://raw.githubusercontent.com/kosyan62/override/642f16f/level03/Resources/script.c | kosyan62/override 642f16f level03/Resources/script.c | true | 200 | 505 | #include <stdio.h>
int main()
{
// Static string to xor from disassembly code
char *to_xor = "Q}|u`sfg~sf{}|a3";
char new_str[17];
printf("Checking all xors for numbers from 0 to 21\n");
int i;
int number = 0;
new_str[16] = 0;
while (number <= 21)
{
i = 0;
while (to... | 7 |
agbuenoch/alx-low_level_programming | 8081603 | 0x13-more_singly_linked_lists/6-pop_listint.c | C | www.github.com/agbuenoch/alx-low_level_programming/tree/main/0x13-more_singly_linked_lists/6-pop_listint.c | https://raw.githubusercontent.com/agbuenoch/alx-low_level_programming/8081603/0x13-more_singly_linked_lists/6-pop_listint.c | agbuenoch/alx-low_level_programming 8081603 0x13-more_singly_linked_lists/6-pop_listint.c | true | 200 | 433 | #include "lists.h"
#include <stdio.h>
#include <stdlib.h>
/**
* pop_listint - function that deletes the head node of a listint_t
* linked list, and returns the head node’s data (n).
*
* @head: pointer-to-pointer-to-listint_t
*
* Return: zero
*/
int pop_listint(listint_t **head)
{
listint_t *temp;
int val;
if (*he... | 3 |
LittleCodingFox/ToastOS | 91ba161 | klibc/string/memcpy.c | C | www.github.com/LittleCodingFox/ToastOS/tree/main/klibc/string/memcpy.c | https://raw.githubusercontent.com/LittleCodingFox/ToastOS/91ba161/klibc/string/memcpy.c | LittleCodingFox/ToastOS 91ba161 klibc/string/memcpy.c | true | 200 | 625 | #include "string.h"
#include "low-level/sse/sse.hpp"
#include "include/kernel.h"
#include <stddef.h>
void *memcpy_basic(void *dst, const void *src, size_t size)
{
asm volatile ("rep movsb"
: "=D" (dst),
"=S" (src),
"=c" (size)
: "0" (dst),
... | 1 |
Rahul-Meow-Meow/11027- | 0bbece4 | gate.bm.49/codes/differentiation.c | C | www.github.com/Rahul-Meow-Meow/11027-/tree/main/gate.bm.49/codes/differentiation.c | https://raw.githubusercontent.com/Rahul-Meow-Meow/11027-/0bbece4/gate.bm.49/codes/differentiation.c | Rahul-Meow-Meow/11027- 0bbece4 gate.bm.49/codes/differentiation.c | true | 200 | 529 | #include<stdio.h>
int u(float t,int t_0){
if (t >= t_0){
return 1;
}
else{
return 0;
}
}
float y(float t){
return t*u(t,0) + (t-2)*u(t,2) - 2*(t-1)*u(t,1);
}
float sym_dif(float x, float h){
return (y(x+h)-y(x-h))/(2*h);
}
void main(){
FILE *fptr;
fptr = fopen("Differentiation.txt","w");
//int *ptr =... | 6 |
y2ghost/study | d935df1 | c/linux/system/lib/popen.c | C | www.github.com/y2ghost/study/tree/main/c/linux/system/lib/popen.c | https://raw.githubusercontent.com/y2ghost/study/d935df1/c/linux/system/lib/popen.c | y2ghost/study d935df1 c/linux/system/lib/popen.c | true | 200 | 2,316 | #include "common.h"
#include <errno.h>
#include <fcntl.h>
#include <sys/wait.h>
static int maxfd = 0;
static pid_t *childpid = NULL;
FILE *popen(const char *cmdstring, const char *type)
{
if (('r'!=type[0] && 'w'!=type[0]) || 0!=type[1]) {
errno = EINVAL;
return NULL;
}
if (NULL == childp... | 2 |
FlavorlessQuark/Advent_of_Code | 267169a | 2017/day_15/p2.c | C | www.github.com/FlavorlessQuark/Advent_of_Code/tree/main/2017/day_15/p2.c | https://raw.githubusercontent.com/FlavorlessQuark/Advent_of_Code/267169a/2017/day_15/p2.c | FlavorlessQuark/Advent_of_Code 267169a 2017/day_15/p2.c | true | 200 | 526 | #include "../../aoc.h"
long getval(long input, int mult, int key)
{
while ((input = ((input * key) % 2147483647)) % mult)
;
return input;
}
int main()
{
_File file;
long A;
long B;
int a;
int b;
int pairs;
size_t i;
file = fetch_file("input", 1);
i = 0;
pairs = 0;
extract_num(file.content + extract_num... | 4 |
HenrySaya/alx-low_level_programming | 8ce61bb | 0x04-more_functions_nested_loops/_putchar.c | C | www.github.com/HenrySaya/alx-low_level_programming/tree/main/0x04-more_functions_nested_loops/_putchar.c | https://raw.githubusercontent.com/HenrySaya/alx-low_level_programming/8ce61bb/0x04-more_functions_nested_loops/_putchar.c | HenrySaya/alx-low_level_programming 8ce61bb 0x04-more_functions_nested_loops/_putchar.c | true | 200 | 239 | #include <unistd.h>
/**
* _putchar - writes character c to stdout
* @c: The char to print
*
* Return: on success 1
* on error, -1 is returned, and errno is
* set appropriately
*/
int _putchar(char c)
{
return (write(1, &c, 1));
}
| 5 |
asmarais/alx-low_level_programming | 8e91737 | 0x04-more_functions_nested_loops/6-print_line.c | C | www.github.com/asmarais/alx-low_level_programming/tree/main/0x04-more_functions_nested_loops/6-print_line.c | https://raw.githubusercontent.com/asmarais/alx-low_level_programming/8e91737/0x04-more_functions_nested_loops/6-print_line.c | asmarais/alx-low_level_programming 8e91737 0x04-more_functions_nested_loops/6-print_line.c | true | 200 | 262 | #include "main.h"
/**
* print_line - a function that prints _ n times
* @n: the number of times the character '_' should be printed
* Return: void
*/
void print_line(int n)
{
int i;
i = 0;
while (i < n)
{
_putchar('_');
i++;
}
_putchar('\n');
}
| 7 |
Mina267/CS50 | f5fb263 | pset3/tideman/tideman.c | C | www.github.com/Mina267/CS50/tree/main/pset3/tideman/tideman.c | https://raw.githubusercontent.com/Mina267/CS50/f5fb263/pset3/tideman/tideman.c | Mina267/CS50 f5fb263 pset3/tideman/tideman.c | true | 200 | 7,072 | #include <cs50.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
// Max number of candidates
#define MAX 9
// preferences[i][j] is number of voters who prefer i over j
//if voter Alice Charlie Bob preferences[i][j] = preferences[0][1] = 3 means there is 3 voter prefere Alice [0] over Charlie [1]
int pref... | 3 |
ramybahy/simple_shellmee | 50d9d42 | shell_token.c | C | www.github.com/ramybahy/simple_shellmee/tree/main/shell_token.c | https://raw.githubusercontent.com/ramybahy/simple_shellmee/50d9d42/shell_token.c | ramybahy/simple_shellmee 50d9d42 shell_token.c | true | 200 | 2,748 | #include "shell.h"
/**
* hsh - main sel lop
* @inform: paaee rtun stut
* @mvor: argum vctr r main()
*
* Return: suces 0, err 1, or err cod
*/
int hsh(info_t *inform, char **mvor)
{
ssize_t t = 0;
int bltn_rt = 0;
while (t != -1 && bltn_rt != -2)
{
clr_inform(inform);
if (intracve(inform))
_pts("$ "... | 1 |
Sarmadaatif/C-Programming-assignments | 5bdd932 | Assignment 2/Factorial of a number n.c | C | www.github.com/Sarmadaatif/C-Programming-assignments/tree/main/Assignment 2/Factorial of a number n.c | https://raw.githubusercontent.com/Sarmadaatif/C-Programming-assignments/5bdd932/Assignment%202/Factorial%20of%20a%20number%20n.c | Sarmadaatif/C-Programming-assignments 5bdd932 Assignment 2/Factorial of a number n.c | true | 200 | 244 | #include<stdio.h>
//Factorial of a number n
int main ()
{
int a,n,fact;
fact=1;
printf("Enter your desired number: ");
scanf("%d",&n);
for (a=n;a>=1;a=a-1)
{
fact=fact*a;
}
printf("The factorial of %d is : %d",n,fact);
} | 0 |
MatteV02/Exercises-FdI-2 | bf88f18 | Esercitazione backtracking - Parte 2/StazioniServizio/stazioniservizio.c | C | www.github.com/MatteV02/Exercises-FdI-2/tree/main/Esercitazione backtracking - Parte 2/StazioniServizio/stazioniservizio.c | https://raw.githubusercontent.com/MatteV02/Exercises-FdI-2/bf88f18/Esercitazione%20backtracking%20-%20Parte%202/StazioniServizio/stazioniservizio.c | MatteV02/Exercises-FdI-2 bf88f18 Esercitazione backtracking - Parte 2/StazioniServizio/stazioniservizio.c | true | 200 | 1,846 | #define CONSUMI 0.05
#define SERBATOIO 30
#include <stdlib.h>
#include <stdio.h>
#include <stdbool.h>
#include <string.h>
#include <float.h>
static void StazioniServizioRec(double m, const double* d, const double* p, size_t n, size_t i, double benz_rimasta, double prezzo_attuale, bool* vcurr, bool* best, double* best... | 2 |
jnkUHaFnir/human-vs-ai | acd396c | 4-3_general-few/general-few_568.c | C | www.github.com/jnkUHaFnir/human-vs-ai/tree/main/4-3_general-few/general-few_568.c | https://raw.githubusercontent.com/jnkUHaFnir/human-vs-ai/acd396c/4-3_general-few/general-few_568.c | jnkUHaFnir/human-vs-ai acd396c 4-3_general-few/general-few_568.c | true | 200 | 409 | #include <stdio.h>
int main() {
FILE *student;
char brst[255];
int count = 0;
student = fopen("student.txt", "r");
if(student == NULL) {
perror("Error opening file");
return 1;
}
while(fgets(brst, 255, student) != NULL) {
printf("%s", brst);
count++;
... | 3 |
walidsaber/alx-low_level_programming | 5354e21 | 0x09-static_libraries/2-strncpy.c | C | www.github.com/walidsaber/alx-low_level_programming/tree/main/0x09-static_libraries/2-strncpy.c | https://raw.githubusercontent.com/walidsaber/alx-low_level_programming/5354e21/0x09-static_libraries/2-strncpy.c | walidsaber/alx-low_level_programming 5354e21 0x09-static_libraries/2-strncpy.c | true | 200 | 320 | #include "main.h"
/**
* *_strncpy - main
* @dest: dest
* @src: src
* @n: int
* Return: void
*/
char *_strncpy(char *dest, char *src, int n)
{
int i = 0, len = 0;
while (src[i++])
len++;
for (i = 0; src[i] && i < n; i++)
dest[i] = src[i];
for (i = len; i < n; i++)
dest[i] = '\0';
return (dest);
}
| 5 |
Nilufa2850/Assignment-07 | 67a57de | Question-06.C | C | www.github.com/Nilufa2850/Assignment-07/tree/main/Question-06.C | https://raw.githubusercontent.com/Nilufa2850/Assignment-07/67a57de/Question-06.C | Nilufa2850/Assignment-07 67a57de Question-06.C | true | 200 | 438 | //Write a program to print all Prime numbers under 100.
#include<stdio.h>
int main()
{
int num, divider, flag;
printf("Prime numbers between 1 to 100 are : ");
for (num=2; num<=100; num++)
{
flag=0;
for (divider=2; divider<=(num/2); divider++)
{
if (num % divider == ... | 1 |
sakarisalmi/minishell | b5913bf | srcs/builtin/echo.c | C | www.github.com/sakarisalmi/minishell/tree/main/srcs/builtin/echo.c | https://raw.githubusercontent.com/sakarisalmi/minishell/b5913bf/srcs/builtin/echo.c | sakarisalmi/minishell b5913bf srcs/builtin/echo.c | true | 200 | 2,156 | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* echo.c :+: :+: :+: ... | 4 |
carolmuia/alx-low_level_programming | 8a56baa | 0x0C-more_malloc_free/100-realloc.c | C | www.github.com/carolmuia/alx-low_level_programming/tree/main/0x0C-more_malloc_free/100-realloc.c | https://raw.githubusercontent.com/carolmuia/alx-low_level_programming/8a56baa/0x0C-more_malloc_free/100-realloc.c | carolmuia/alx-low_level_programming 8a56baa 0x0C-more_malloc_free/100-realloc.c | true | 200 | 785 | #include "main.h"
#include <stdlib.h>
#include <stdio.h>
/**
* _realloc - function that reallocates a memory block using malloc and free
* @ptr: pointer to the memory previously allocated
* @old_size: old size to be reallocated
* @new_size: new size allocated
* Return:
*/
void *_realloc(void *ptr, unsigned int o... | 2 |
EnricoDAlessandro97UNI/DisneyWorld | f39d707 | DisneyWorldMigliorativo/src/infinite_horizon_better/block1_tickets/msq_block1.c | C | www.github.com/EnricoDAlessandro97UNI/DisneyWorld/tree/main/DisneyWorldMigliorativo/src/infinite_horizon_better/block1_tickets/msq_block1.c | https://raw.githubusercontent.com/EnricoDAlessandro97UNI/DisneyWorld/f39d707/DisneyWorldMigliorativo/src/infinite_horizon_better/block1_tickets/msq_block1.c | EnricoDAlessandro97UNI/DisneyWorld f39d707 DisneyWorldMigliorativo/src/infinite_horizon_better/block1_tickets/msq_block1.c | true | 200 | 11,320 | /* -------------------------------------------------------------------------
* Name : msq.c (Multi-Server Queue)
* Author : Enrico D'Alessandro & Alessandro De Angelis
* Language : ANSI C
* -------------------------------------------------------------------------
*/
#include <stdi... | 5 |
leomax2002/Organizacao-e-Arquitetura-de-Computadores | f190413 | Processador Pipeline/PipelineProcessor-main/References/riscv_func.c | C | www.github.com/leomax2002/Organizacao-e-Arquitetura-de-Computadores/tree/main/Processador Pipeline/PipelineProcessor-main/References/riscv_func.c | https://raw.githubusercontent.com/leomax2002/Organizacao-e-Arquitetura-de-Computadores/f190413/Processador%20Pipeline/PipelineProcessor-main/References/riscv_func.c | leomax2002/Organizacao-e-Arquitetura-de-Computadores f190413 Processador Pipeline/PipelineProcessor-main/References/riscv_func.c | true | 200 | 13,354 | //
// Created by Ricardo Jacobi on 18/11/22.
//
#include "globals.h"
#include "riscv.h"
#include "memoria.h"
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
//
// Initial values for registers
//
void init() {
pc = 0;
ri = 0;
stop_prg = 0;
sp = 0x3ffc;
gp = 0x1800;
build_dic();
}
v... | 3 |
timothyajayi/alx-low_level_programming | 8411620 | 0x05-pointers_arrays_strings/7-puts_half.c | C | www.github.com/timothyajayi/alx-low_level_programming/tree/main/0x05-pointers_arrays_strings/7-puts_half.c | https://raw.githubusercontent.com/timothyajayi/alx-low_level_programming/8411620/0x05-pointers_arrays_strings/7-puts_half.c | timothyajayi/alx-low_level_programming 8411620 0x05-pointers_arrays_strings/7-puts_half.c | true | 200 | 386 | #include "main.h"
/**
* puts_half - a function that prints half of a string
* follow by new line
* @str: as the input
* Return: half of input
*/
void puts_half(char *str)
{
int n, m, len;
len = 0;
for (n = 0; str[n] != '\0'; n++)
len++;
m = (len / 2);
if ((len % 2) == 1)
m = ((len + 1) / 2);
for (n... | 1 |
upmem/usecase_dpu_alignment | ce5cd08 | libnwdpu/dpu/mram_bit_array_32.h | C | www.github.com/upmem/usecase_dpu_alignment/tree/main/libnwdpu/dpu/mram_bit_array_32.h | https://raw.githubusercontent.com/upmem/usecase_dpu_alignment/ce5cd08/libnwdpu/dpu/mram_bit_array_32.h | upmem/usecase_dpu_alignment ce5cd08 libnwdpu/dpu/mram_bit_array_32.h | true | 200 | 2,045 | /*
* Copyright 2022 - UPMEM
*/
#ifndef CD9DA9ED_324F_4111_B265_C9B05CE433CF
#define CD9DA9ED_324F_4111_B265_C9B05CE433CF
#include "wram_aligned_buffer.h"
typedef struct mram_bit_array_32
{
__mram_ptr uint8_t *base_ptr;
uint32_t current_offset;
uint8_t *wram_buffer;
bool written;
} __attribute__((al... | 4 |
jgpeiro/dso138 | f1fce6a | software/Src/tim.c | C | www.github.com/jgpeiro/dso138/tree/main/software/Src/tim.c | https://raw.githubusercontent.com/jgpeiro/dso138/f1fce6a/software/Src/tim.c | jgpeiro/dso138 f1fce6a software/Src/tim.c | true | 200 | 8,032 | /**
******************************************************************************
* File Name : TIM.c
* Description : This file provides code for the configuration
* of the TIM instances.
******************************************************************************
* @... | 2 |
Zymoclassic/alx-low_level_programming | 0439580 | 0x09-static_libraries/0-strcat.c | C | www.github.com/Zymoclassic/alx-low_level_programming/tree/main/0x09-static_libraries/0-strcat.c | https://raw.githubusercontent.com/Zymoclassic/alx-low_level_programming/0439580/0x09-static_libraries/0-strcat.c | Zymoclassic/alx-low_level_programming 0439580 0x09-static_libraries/0-strcat.c | true | 200 | 373 | #include "main.h"
/**
*_strcat - function commute srtings
*@dest: param pointer to a char
*@src: param pointer to a char
*Return: return value of dest
*/
char *_strcat(char *dest, char *src)
{
int i;
int j;
i = 0;
j = 0;
while (dest[i] != '\0')
{
i++;
}
while (src[j] != '\0')
{
dest[i] = src[j];
... | 5 |
Kobe972/osh-2022-labs | bb749a0 | lab3/1.c | C | www.github.com/Kobe972/osh-2022-labs/tree/main/lab3/1.c | https://raw.githubusercontent.com/Kobe972/osh-2022-labs/bb749a0/lab3/1.c | Kobe972/osh-2022-labs bb749a0 lab3/1.c | true | 200 | 2,057 | #include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <pthread.h>
struct Pipe {
int fd_send;
int fd_recv;
};
void send_seg(int fd,char* buffer); //send segment by segment,delimited by '\n'
void *handle_chat(void *data) {
stru... | 1 |
VamsiKrishna80/Embedded-System-Programming-Course | c1c54be | STM32 board problems/SEVEN SEGMENT set2/9 seven seg_Switch.c | C | www.github.com/VamsiKrishna80/Embedded-System-Programming-Course/tree/main/STM32 board problems/SEVEN SEGMENT set2/9 seven seg_Switch.c | https://raw.githubusercontent.com/VamsiKrishna80/Embedded-System-Programming-Course/c1c54be/STM32%20board%20problems/SEVEN%20SEGMENT%20set2/9%20seven%20seg_Switch.c | VamsiKrishna80/Embedded-System-Programming-Course c1c54be STM32 board problems/SEVEN SEGMENT set2/9 seven seg_Switch.c | true | 200 | 3,050 | /*
*/
#include"STM32F407VGT6_GPIO.h"
void delay() //delay function
{
volatile uint32_t count=900000;
while(--count);
}
void DELAY() //delay function
{
volatile uint32_t count=900000;
while(--count);
}
uint8_t ReadSwitch(void)
{
volatile uint32_t *pGPIOclken=(uint32_t*)0x400... | 4 |
LLNL/SAC2000 | c347f4f | src/gem/xgt.c | C | www.github.com/LLNL/SAC2000/tree/main/src/gem/xgt.c | https://raw.githubusercontent.com/LLNL/SAC2000/c347f4f/src/gem/xgt.c | LLNL/SAC2000 c347f4f src/gem/xgt.c | true | 200 | 3,652 | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "../../inc/complex.h"
#include "../../inc/proto.h"
#include <string.h>
#include "../../inc/mach.h"
#include "../../inc/gem.h"
#include "../../inc/hdr.h"
#include "../../inc/gam.h"
#include "../../inc/gdm.h"
void /*FUNCTION*/ xgt(nerr)
int *ne... | 2 |
Srinivasulu2693/Data-structures | 610cd66 | BST.c | C | www.github.com/Srinivasulu2693/Data-structures/tree/main/BST.c | https://raw.githubusercontent.com/Srinivasulu2693/Data-structures/610cd66/BST.c | Srinivasulu2693/Data-structures 610cd66 BST.c | true | 200 | 2,140 | #include <stdio.h>
#include <stdlib.h>
#include <malloc.h>
struct node
{
int data;
struct node *left;
struct node *right;
} *root = NULL, *newnode;
struct node *create(struct node *root, int val)
{
if (root == NULL)
{
newnode = (struct node *)malloc(sizeof(struct node));
newnode->da... | 3 |
tillber/kth | 81e2681 | id1206/mylloc/bench-ext.c | C | www.github.com/tillber/kth/tree/main/id1206/mylloc/bench-ext.c | https://raw.githubusercontent.com/tillber/kth/81e2681/id1206/mylloc/bench-ext.c | tillber/kth 81e2681 id1206/mylloc/bench-ext.c | true | 200 | 1,203 | //bench-ext.c
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include "rand.h"
#define ROUNDS 10
#define LOOP 100000
#define BUFFER 100
int main(){
void *init = sbrk(0);
void *current;
void *buffer[BUFFER];
for(int i = 0; i < BUFFER; i++){
buffer[i] = NULL;
}
printf("The ... | 5 |
hwooch/BaekJoon | f6f7bc0 | succeed/Bronze5/10952 A+B -5.c | C | www.github.com/hwooch/BaekJoon/tree/main/succeed/Bronze5/10952 A+B -5.c | https://raw.githubusercontent.com/hwooch/BaekJoon/f6f7bc0/succeed/Bronze5/10952%20A%2BB%20-5.c | hwooch/BaekJoon f6f7bc0 succeed/Bronze5/10952 A+B -5.c | true | 200 | 562 | #define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <stdlib.h>
// 10952 A+B -5
// ����
// �� ���� A�� B�� �Է¹��� ����, A + B�� ����ϴ� ���α��� �ۼ��Ͻÿ�.
//
// �Է�
// �Է��� ���� ���� ��Ʈ ���̽��� �̷���� �ִ�.
//
// �� ��Ʈ ���̽��� �� �ٷ� �̷���� ������, �� �ٿ� A�� B�� �־�����. (0 < A, B < 10)
//
// �Է��� ��������... | 1 |
RodrigoFloresB/AyEDII-labs | e8583b7 | lab05/ej5/c-constant/queue.c | C | www.github.com/RodrigoFloresB/AyEDII-labs/tree/main/lab05/ej5/c-constant/queue.c | https://raw.githubusercontent.com/RodrigoFloresB/AyEDII-labs/e8583b7/lab05/ej5/c-constant/queue.c | RodrigoFloresB/AyEDII-labs e8583b7 lab05/ej5/c-constant/queue.c | true | 200 | 2,973 | #include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include "queue.h"
struct s_queue {
unsigned int length;
nodo last; // apunta al ultimo nodo de la cola
nodo first; // apunta al primer nodo de la cola
};
struct s_node {
queue_elem elem;
struct s_node *next;
};
sta... | 4 |
OmanVic/alx-low_level_programming | 0d088b3 | 0x07-pointers_arrays_strings/0-memset.c | C | www.github.com/OmanVic/alx-low_level_programming/tree/main/0x07-pointers_arrays_strings/0-memset.c | https://raw.githubusercontent.com/OmanVic/alx-low_level_programming/0d088b3/0x07-pointers_arrays_strings/0-memset.c | OmanVic/alx-low_level_programming 0d088b3 0x07-pointers_arrays_strings/0-memset.c | true | 200 | 316 | #include "main.h"
/**
* _memset - a function thst fills memory with a constant byte
*
* @s: first variable
*
* @n: second variable
*
* @b: constant variable
*
* Return: s
*
*/
char *_memset(char *s, char b, unsigned int n)
{
unsigned int i = 0;
for (i = 0; i < n; i++)
{
s[i] = b;
}
return (s);
}
| 2 |
ZFudge/chocolate-smart-home-microcontrollers | 5efac4d | neo_pixel/rgbs.h | C | www.github.com/ZFudge/chocolate-smart-home-microcontrollers/tree/main/neo_pixel/rgbs.h | https://raw.githubusercontent.com/ZFudge/chocolate-smart-home-microcontrollers/5efac4d/neo_pixel/rgbs.h | ZFudge/chocolate-smart-home-microcontrollers 5efac4d neo_pixel/rgbs.h | true | 200 | 690 | #ifndef RGBS_H
#define RGBS_H
const byte NUM_COLORS = 9;
const byte PIXELS_LENGTH = 27;
// Default "Outrun" palette
byte rgbs[NUM_COLORS][3] = {
{ 0, 255, 255 }, // cyan
{ 3, 148, 252 }, // turquoise
{ 3, 65, 252 }, // blue 1
{ 0, 0, 255 }, // blue 2
{ 85, 0, 255 }, // purple ... | 3 |
MaximeMAIRE/JeuDeLaVie | ac56940 | code/src/grille.c | C | www.github.com/MaximeMAIRE/JeuDeLaVie/tree/main/code/src/grille.c | https://raw.githubusercontent.com/MaximeMAIRE/JeuDeLaVie/ac56940/code/src/grille.c | MaximeMAIRE/JeuDeLaVie ac56940 code/src/grille.c | true | 200 | 1,597 | #include "grille.h"
#include "io.h"
/**
* \file grille.c
* code pour les fonctions sur les grilles
* \author Maxime MAIRE
*/
void alloue_grille (int l, int c, grille* g)
{
g->nbl = l;
g->nbc = c;
g->cellules = malloc((g->nbl) * sizeof(int*));
if (g->cellules == NULL)
{
perror("malloc");
exit(1);
}
... | 5 |
CuSynth/OOP-course | f88b152 | Factory/main.c | C | www.github.com/CuSynth/OOP-course/tree/main/Factory/main.c | https://raw.githubusercontent.com/CuSynth/OOP-course/f88b152/Factory/main.c | CuSynth/OOP-course f88b152 Factory/main.c | true | 200 | 455 | //#define _CRTDBG_MAP_ALLOC
//#include <stdlib.h>
//#include <crtdbg.h>
#include <stdio.h>
#include "factory.h"
int main(int argc, char* argv[]) {
const char* file_name = "data.txt";
if (argc == 2)
file_name = argv[1];
else
printf("Using default file.\n");
printf("Opening file '%s'.\n", file_... | 4 |
Imanuelle-glitch/alx-low_level_programming | e275434 | 0x05-pointers_arrays_strings/0-reset_to_98.c | C | www.github.com/Imanuelle-glitch/alx-low_level_programming/tree/main/0x05-pointers_arrays_strings/0-reset_to_98.c | https://raw.githubusercontent.com/Imanuelle-glitch/alx-low_level_programming/e275434/0x05-pointers_arrays_strings/0-reset_to_98.c | Imanuelle-glitch/alx-low_level_programming e275434 0x05-pointers_arrays_strings/0-reset_to_98.c | true | 200 | 171 | #include "main.h"
/**
* reset_to_98 - updates the value of what is pointed at
* @n: the pointer denoted as *n
* Return: void
*/
void reset_to_98(int *n)
{
*n = 98;
}
| 1 |
YouseefSaad/alx-low_level_programming | 3e44c0c | 0x01-variables_if_else_while/1-last_digit.c | C | www.github.com/YouseefSaad/alx-low_level_programming/tree/main/0x01-variables_if_else_while/1-last_digit.c | https://raw.githubusercontent.com/YouseefSaad/alx-low_level_programming/3e44c0c/0x01-variables_if_else_while/1-last_digit.c | YouseefSaad/alx-low_level_programming 3e44c0c 0x01-variables_if_else_while/1-last_digit.c | true | 200 | 507 | #include <stdlib.h>
#include <time.h>
#include <stdio.h>
/**
*main - assign a random number to variable n and
*then check the last number
*Return: Always 0 (Success)
*/
int main(void)
{
int n;
int m;
srand(time(0));
n = rand() - RAND_MAX / 2;
m = n % 10;
printf("Last digit of %d is %d ", n, m);
if (m > 5... | 2 |
Desuwaa/alx-low_level_programming | 0a65687 | 0x14-bit_manipulation/0-binary_to_uint.c | C | www.github.com/Desuwaa/alx-low_level_programming/tree/main/0x14-bit_manipulation/0-binary_to_uint.c | https://raw.githubusercontent.com/Desuwaa/alx-low_level_programming/0a65687/0x14-bit_manipulation/0-binary_to_uint.c | Desuwaa/alx-low_level_programming 0a65687 0x14-bit_manipulation/0-binary_to_uint.c | true | 200 | 707 | #include "main.h"
/**
* binary_to_uint - Convert a binary number to an unsigned integer
* @b: String representing a binary number
* Return: converted number or 0 if b is NULL or if there are chars
* that are not 0 or 1
*/
unsigned int binary_to_uint(const char *b)
{
unsigned int len, s, t, sum, pow;
int base;
... | 3 |
Steve-omush/alx-low_level_programming | 32b11be | 0x12-singly_linked_lists/3-add_node_end.c | C | www.github.com/Steve-omush/alx-low_level_programming/tree/main/0x12-singly_linked_lists/3-add_node_end.c | https://raw.githubusercontent.com/Steve-omush/alx-low_level_programming/32b11be/0x12-singly_linked_lists/3-add_node_end.c | Steve-omush/alx-low_level_programming 32b11be 0x12-singly_linked_lists/3-add_node_end.c | true | 200 | 1,005 | #include <stdlib.h>
#include <string.h>
#include "lists.h"
size_t _strlen(const char *str);
/**
* add_node_end - adds a new node at the end of a list_t list.
* @head: pointer to the head of the list_t.
* @str: string to be added.
*
* Return: address of new element.
*/
list_t *add_node_end(list_t **head, const c... | 5 |
MuchesiaKe/alx_recap | c9e50b5 | shell/fork.c | C | www.github.com/MuchesiaKe/alx_recap/tree/main/shell/fork.c | https://raw.githubusercontent.com/MuchesiaKe/alx_recap/c9e50b5/shell/fork.c | MuchesiaKe/alx_recap c9e50b5 shell/fork.c | true | 200 | 328 | #include <stdio.h>
#include <unistd.h>
/**
*main - fork example
*
*Return: Always 0
**/
int main(void)
{
pid_t my_pid;
pid_t pid;
printf("Before fork\n");
pid = fork();
if (pid == -1)
{
perror("Error: ");
return (1);
}
printf("After fork\n");
my_pid = getpid();
printf("My pid is %u\n", my_pid);
return... | 4 |
himanshu1221/Data_Structure_Lab | fb00f20 | bubble_sort.c | C | www.github.com/himanshu1221/Data_Structure_Lab/tree/main/bubble_sort.c | https://raw.githubusercontent.com/himanshu1221/Data_Structure_Lab/fb00f20/bubble_sort.c | himanshu1221/Data_Structure_Lab fb00f20 bubble_sort.c | true | 200 | 962 | #include<stdio.h>
// traversing array
void printarray(int a[],int n){
for (int i = 0; i < n; i++)
{
printf("%d ",a[i]);
}
printf("\n");
}
void bubblesort(int a[],int n){
int temp;
int issorted=0;
// for number of pass
for (int i = 0; i < n-1; i++)
{
printf("workin... | 1 |
budiong054/alx-higher_level_programming | 7ec787f | 0x00-python-hello_world/10-check_cycle.c | C | www.github.com/budiong054/alx-higher_level_programming/tree/main/0x00-python-hello_world/10-check_cycle.c | https://raw.githubusercontent.com/budiong054/alx-higher_level_programming/7ec787f/0x00-python-hello_world/10-check_cycle.c | budiong054/alx-higher_level_programming 7ec787f 0x00-python-hello_world/10-check_cycle.c | true | 200 | 380 | #include "lists.h"
/**
* check_cycle - checks if a singly linked list has a cycle in it
* @list: pointer to head of list
*
* Return: 0 if there is no cycle, 1 if there is a cycle
*/
int check_cycle(listint_t *list)
{
listint_t *current;
current = list;
while (current != NULL)
{
if (current->next == list)
... | 2 |
Vikiey/alx-low_level_programming | e1faac2 | 0x0E-structures_typedef/2-print_dog.c | C | www.github.com/Vikiey/alx-low_level_programming/tree/main/0x0E-structures_typedef/2-print_dog.c | https://raw.githubusercontent.com/Vikiey/alx-low_level_programming/e1faac2/0x0E-structures_typedef/2-print_dog.c | Vikiey/alx-low_level_programming e1faac2 0x0E-structures_typedef/2-print_dog.c | true | 200 | 440 | #include "dog.h"
/**
* print_dog - a function that prints a struct dog
* @d: pointer to structure variable
*/
void print_dog(struct dog *d)
{
if (d == NULL)
return; /* returns nothing */
if (d->name == NULL)
printf("Name: (nil)\n");
else
printf("Name: %s\n", d->name);
/* float value can't be null */
pri... | 3 |
Nessmakandil/alx-low_level_programming | 8977e28 | 0x09-static_libraries/2-strchr.c | C | www.github.com/Nessmakandil/alx-low_level_programming/tree/main/0x09-static_libraries/2-strchr.c | https://raw.githubusercontent.com/Nessmakandil/alx-low_level_programming/8977e28/0x09-static_libraries/2-strchr.c | Nessmakandil/alx-low_level_programming 8977e28 0x09-static_libraries/2-strchr.c | true | 200 | 354 | #include "main.h"
/**
* _strchr - locates a character in a string.
*
* @s: pointer to the first occurrence of the character c.
* @c: char value.
*
* Return: pointer s.
*/
char *_strchr(char *s, char c)
{
char *ptr = NULL;
while (*s != '\0')
{
if (*s == c)
{
ptr = s;
break;
}
s++;
}
if (*s =... | 5 |
dzwduan/ml-rsim | 93bcdef | src/Memory/mmc_main.c | C | www.github.com/dzwduan/ml-rsim/tree/main/src/Memory/mmc_main.c | https://raw.githubusercontent.com/dzwduan/ml-rsim/93bcdef/src/Memory/mmc_main.c | dzwduan/ml-rsim 93bcdef src/Memory/mmc_main.c | true | 200 | 9,596 | /*
* Copyright (c) 2002 The Board of Trustees of the University of Illinois and
* William Marsh Rice University
* Copyright (c) 2002 The University of Utah
* Copyright (c) 2002 The University of Notre Dame du Lac
*
* All rights reserved.
*
* Based on RSIM 1.0, developed by:
* Professor Sar... | 1 |
MahmoudNiazyy/AVR_drive | 1a3d010 | MCAL/TIMERS/TIMER_int.h | C | www.github.com/MahmoudNiazyy/AVR_drive/tree/main/MCAL/TIMERS/TIMER_int.h | https://raw.githubusercontent.com/MahmoudNiazyy/AVR_drive/1a3d010/MCAL/TIMERS/TIMER_int.h | MahmoudNiazyy/AVR_drive 1a3d010 MCAL/TIMERS/TIMER_int.h | true | 200 | 5,180 | /*
* TIMER_int.h
*
* Created on: Aug 25, 2023
* Author: WIN 10 PRO
*/
#ifndef MCAL_TIMERS_TIMER_INT_H_
#define MCAL_TIMERS_TIMER_INT_H_
/* Timer 0 */
#define TCNT0 (*(volatile unsigned char*)0x52)
#define TCCR0 (*(volatile unsigned char*)0x53)
/* TCCR0 */
#define FOC0 7
#define WGM00 6
#define COM... | 4 |
Navneet9968/Base-codes-and-other-stuff | 2a753ec | programming/let us c/ch5/8.c | C | www.github.com/Navneet9968/Base-codes-and-other-stuff/tree/main/programming/let us c/ch5/8.c | https://raw.githubusercontent.com/Navneet9968/Base-codes-and-other-stuff/2a753ec/programming/let%20us%20c/ch5/8.c | Navneet9968/Base-codes-and-other-stuff 2a753ec programming/let us c/ch5/8.c | true | 200 | 333 | #include<stdio.h>
#include<math.h>
int main(){
int num = 0;
printf("enter the number:\n");
scanf("%d", &num);
int a=0,f=0,oct=0,i=0;
while(num!=0){
a=num/8;
f=num%8;
oct=oct+(pow(10,i))*f;
i++;
num=num/8;
}
printf("the octal equivalent is :%d\n",oct);
... | 2 |
Sadhvika55/PPS | b482863 | transpose.c | C | www.github.com/Sadhvika55/PPS/tree/main/transpose.c | https://raw.githubusercontent.com/Sadhvika55/PPS/b482863/transpose.c | Sadhvika55/PPS b482863 transpose.c | true | 200 | 481 | #include<stdio.h>
#define max 10
int main()
{
int A[max][max];
int r1,c1,transpose[max][max],i,j;
printf("\n enter the size of A");
scanf("%d%d",&r1,&c1);
printf("\n enter %d element into A",r1*c1);
for (i=0;i<r1;i++)
{
for(j=0;j<c1;j++)
{
scanf("%d",&A[i][j]);
}
}
for(i=0;i<c1;i++)
{
for(j=0;j<r1;j++)
{
... | 3 |
dirga76/IOT_havo.github.io | 5d4feb2 | LS IOT (Arduino)/style.h | C | www.github.com/dirga76/IOT_havo.github.io/tree/main/LS IOT (Arduino)/style.h | https://raw.githubusercontent.com/dirga76/IOT_havo.github.io/5d4feb2/LS%20IOT%20%28Arduino%29/style.h | dirga76/IOT_havo.github.io 5d4feb2 LS IOT (Arduino)/style.h | true | 200 | 5,729 | /* Pengaturan Body Website*/
char webpage[] PROGMEM = R"=====(
body {
font-family: "Open Sans", sans-serif;
color: #140a0a;
background-image: url(img/background.png);
background-size: cover;
background-repeat: no-repeat;
background-position: center;
background-attachment: fixed;
... | 5 |
leejeongmln/study | 6b7c231 | study/12_01_05.c | C | www.github.com/leejeongmln/study/tree/main/study/12_01_05.c | https://raw.githubusercontent.com/leejeongmln/study/6b7c231/study/12_01_05.c | leejeongmln/study 6b7c231 study/12_01_05.c | true | 200 | 210 | #include<stdio.h>
void main() {
char data[5] = { 1,2,3,4,5 };
int result = 0;
int i;
for (i = 0; i < 5; i++) {
result = result + data[i];
}
printf("data �迭�� �� ����� ���� %d �Դϴ�.", result);
} | 4 |
DamianJennifer/alx-low_level_programming | d0683b8 | 0x02-functions_nested_loops/4-isalpha.c | C | www.github.com/DamianJennifer/alx-low_level_programming/tree/main/0x02-functions_nested_loops/4-isalpha.c | https://raw.githubusercontent.com/DamianJennifer/alx-low_level_programming/d0683b8/0x02-functions_nested_loops/4-isalpha.c | DamianJennifer/alx-low_level_programming d0683b8 0x02-functions_nested_loops/4-isalpha.c | true | 200 | 245 | #include "main.h"
/**
* _isalpha - Return 1 if c is a letter. lowercase or uppercase
* @c: The int to print
* Return: Always 0
*/
int _isalpha(int c)
{
if ((c > 'a' && c < 'z') || (c > 'A' && c < 'Z'))
{
return (1);
}
else
{
return (0);
}
}
| 1 |
free13shooter/LScan2 | cfa09fb | Hardware.h | C | www.github.com/free13shooter/LScan2/tree/main/Hardware.h | https://raw.githubusercontent.com/free13shooter/LScan2/cfa09fb/Hardware.h | free13shooter/LScan2 cfa09fb Hardware.h | true | 200 | 10,656 | /**
Laser project by dem1305
LScan hardware default settings of pins and ports
@11/6/2015
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __HARDWARE_H
#define __HARDWARE_H
#include "stm32f4xx_gpio.h"
#include "stm32f4xx.h"
/* ---------------------------------------... | 3 |
zak0725/christmasTree | 6bd398b | src/christ.c | C | www.github.com/zak0725/christmasTree/tree/main/src/christ.c | https://raw.githubusercontent.com/zak0725/christmasTree/6bd398b/src/christ.c | zak0725/christmasTree 6bd398b src/christ.c | true | 200 | 1,522 | #include "christ.h"
#include <signal.h>
void christTree(void)
{
int seg = 2, lseg = TREE_START + 1;
int space = 0;
mvaddch(TREE_START, STAR_A, '*' | A_BOLD | COLOR_PAIR(YELLOW));
addch('*' | A_BOLD | COLR(YELLOW));
for (int y = TREE_START + 1, x = STAR_A; y < LINER; y++, x--, space += 2) {
if (y - lseg == seg ... | 5 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.