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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
anirudhagaikwad/C_Programming | e0849c1 | C_PPTWise_Programs/PPT9/two.c | C | www.github.com/anirudhagaikwad/C_Programming/tree/main/C_PPTWise_Programs/PPT9/two.c | https://raw.githubusercontent.com/anirudhagaikwad/C_Programming/e0849c1/C_PPTWise_Programs/PPT9/two.c | anirudhagaikwad/C_Programming e0849c1 C_PPTWise_Programs/PPT9/two.c | true | 200 | 541 | /*
C program for Pointer to a Function.
*/
#include<stdio.h>
int func(int a, int b) // function definition
{
printf("\n\n a = %d \n", a);
printf("\n\n b = %d \n", b);
}
int main()
{
printf("\n\n\t\tKeep Learning\n\n\n");
// function pointer
int(*fptr)(int , int);
// assign address... | 5 |
yuan-fang-228/holbertonschool-low_level_programming | ca08331 | 0x0A-argc_argv/3-mul.c | C | www.github.com/yuan-fang-228/holbertonschool-low_level_programming/tree/main/0x0A-argc_argv/3-mul.c | https://raw.githubusercontent.com/yuan-fang-228/holbertonschool-low_level_programming/ca08331/0x0A-argc_argv/3-mul.c | yuan-fang-228/holbertonschool-low_level_programming ca08331 0x0A-argc_argv/3-mul.c | true | 200 | 463 | #include "main.h"
#include <stdio.h>
#include <stdlib.h>
/**
* main - multiplies two numbers
* @argc: the number of the command line arguments
* @argv: the array of the command line arguments
* Return: return 0 if ok, return 1 if there is an error
*/
int main(int argc, char *argv[])
{
int result;
if (argc... | 3 |
MCRChannels/C_Programming_Files | e212795 | File_C_Prog/Lab24.c | C | www.github.com/MCRChannels/C_Programming_Files/tree/main/File_C_Prog/Lab24.c | https://raw.githubusercontent.com/MCRChannels/C_Programming_Files/e212795/File_C_Prog/Lab24.c | MCRChannels/C_Programming_Files e212795 File_C_Prog/Lab24.c | true | 200 | 1,701 | #include <stdio.h>
#define Max_Size 10
int main() {
int A[Max_Size][Max_Size], B[Max_Size][Max_Size], C[Max_Size][Max_Size];
int size_i, size_j;
int i, j, sum;
float average;
char choice;
printf("[Max Size Array : 10]\n");
do {
do {
printf("Please enter Size of Array2D [i] : ");... | 7 |
mahmud-hosen/C-Programming | 2c340c6 | C Programming/stracturw55.c | C | www.github.com/mahmud-hosen/C-Programming/tree/main/C Programming/stracturw55.c | https://raw.githubusercontent.com/mahmud-hosen/C-Programming/2c340c6/C%20Programming/stracturw55.c | mahmud-hosen/C-Programming 2c340c6 C Programming/stracturw55.c | true | 200 | 316 | #include<stdio.h>
struct stu
{
int roll;
double result;
char name[10];
};
int main()
{
int i;
struct stu a[3];
for(i=0;i<3;i++)
{
scanf("%d %lf %s",&a[i].roll,&a[i].result,&a[i].name);
}
for(i=0;i<3;i++)
{
printf("%d %lf %s\n",a[i].roll,a[i].result,a[i].name);
}
return 0;
}
| 6 |
AlessandroRossi7/AlessandroRossi7 | a377b36 | Laboratori_2022-2023/2023-01-23-Lab_8/dadoGlobale.c | C | www.github.com/AlessandroRossi7/AlessandroRossi7/tree/main/Laboratori_2022-2023/2023-01-23-Lab_8/dadoGlobale.c | https://raw.githubusercontent.com/AlessandroRossi7/AlessandroRossi7/a377b36/Laboratori_2022-2023/2023-01-23-Lab_8/dadoGlobale.c | AlessandroRossi7/AlessandroRossi7 a377b36 Laboratori_2022-2023/2023-01-23-Lab_8/dadoGlobale.c | true | 200 | 401 | #include <stdlib.h>
#include <stdio.h>
#include <pthread.h>
int parametroOUT;
void* codice(void*arg){
srand(time(NULL));
parametroOUT = (rand() % 6) + 1;
pthread_exit((void*)¶metroOUT);
}
int main (){
int dadoEstratto, *risultato;
pthread_t t1;
pthread_create(&t1, NULL, codice, NULL);
pthread_join(t1, ... | 1 |
Gourav1695/Operating_System_Lab | 75c7177 | Assignment_6/Assignment_6_class/p2.c | C | www.github.com/Gourav1695/Operating_System_Lab/tree/main/Assignment_6/Assignment_6_class/p2.c | https://raw.githubusercontent.com/Gourav1695/Operating_System_Lab/75c7177/Assignment_6/Assignment_6_class/p2.c | Gourav1695/Operating_System_Lab 75c7177 Assignment_6/Assignment_6_class/p2.c | true | 200 | 1,410 | // 2020CSB010 GOURAV KUMAR SHAW
#include <semaphore.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/ipc.h> /* for shmget() shmctl() */
#include <unistd.h>
#include <sys/shm.h> /* for shmget() shmctl() */
#include <signal.h> /* for signal(2) kill(2) */
#include <time.h>
sem_t sem1;
sem_t sem2;
... | 4 |
7034megatron/alx-low_level_programming | 84b53c1 | 0x05-pointers_arrays_strings/0-reset_to_98.c | C | www.github.com/7034megatron/alx-low_level_programming/tree/main/0x05-pointers_arrays_strings/0-reset_to_98.c | https://raw.githubusercontent.com/7034megatron/alx-low_level_programming/84b53c1/0x05-pointers_arrays_strings/0-reset_to_98.c | 7034megatron/alx-low_level_programming 84b53c1 0x05-pointers_arrays_strings/0-reset_to_98.c | true | 200 | 202 | #include "main.h"
/**
* reset_to_98 - This function updates value of a pointer
* @n: integer
* Description: his function takes an integer and changes it to 98
*/
void reset_to_98(int *n)
{
*n = 98;
}
| 0 |
moledoc/letsC | 8583259 | sore/DOG.c | C | www.github.com/moledoc/letsC/tree/main/sore/DOG.c | https://raw.githubusercontent.com/moledoc/letsC/8583259/sore/DOG.c | moledoc/letsC 8583259 sore/DOG.c | true | 200 | 2,040 | #include <stdio.h>
// README DOG is like dog, but it parses escaped symbols.
char escape(char c, FILE *f);
char escape(char c, FILE *f)
{
if ( c == '0' || c == '1') {
char prev;
char oct = 0;
for ( int i = 0; i<3 || c == EOF; ++i ){
if ( c >= '0' && c <= '9'){
if ( i ) {
oct *= 8;
}
oct +... | 2 |
Nirmal0333/Development | 246f8f0 | 01 - Copy.c | C | www.github.com/Nirmal0333/Development/tree/main/01 - Copy.c | https://raw.githubusercontent.com/Nirmal0333/Development/246f8f0/01%20-%20Copy.c | Nirmal0333/Development 246f8f0 01 - Copy.c | true | 200 | 313 | #include<stdio.h>
int Divide(int iNo1, int iNo2)
{
int iAns = 0;
if(iNo2 > iNo1)
{
return -1;
}
iAns = iNo1/iNo2;
return iAns;
}
int main()
{
int iValue1 = 15, iValue2 = 5;
int iRet = 0;
iRet = Divide(iValue1, iValue2);
printf("Division is : %d",&iRet);
return 0;
} | 5 |
Nareshramamoorthi/100-programs-in-c | 2dfcb22 | Solve a System of Linear Equations Using Gaussian Elimination.c | C | www.github.com/Nareshramamoorthi/100-programs-in-c/tree/main/Solve a System of Linear Equations Using Gaussian Elimination.c | https://raw.githubusercontent.com/Nareshramamoorthi/100-programs-in-c/2dfcb22/Solve%20a%20System%20of%20Linear%20Equations%20Using%20Gaussian%20Elimination.c | Nareshramamoorthi/100-programs-in-c 2dfcb22 Solve a System of Linear Equations Using Gaussian Elimination.c | true | 200 | 1,697 | #include <stdio.h>
#define MAX 10
// Function to perform Gaussian elimination
void gaussianElimination(float matrix[MAX][MAX], int n) {
for (int i = 0; i < n; i++) {
// Make the diagonal element 1
float pivot = matrix[i][i];
for (int j = 0; j <= n; j++) {
matrix[i][j]... | 7 |
KisingiMichael/alx-low_level_programming | 988b9f3 | 0x0F-function_pointers/3-get_op_func.c | C | www.github.com/KisingiMichael/alx-low_level_programming/tree/main/0x0F-function_pointers/3-get_op_func.c | https://raw.githubusercontent.com/KisingiMichael/alx-low_level_programming/988b9f3/0x0F-function_pointers/3-get_op_func.c | KisingiMichael/alx-low_level_programming 988b9f3 0x0F-function_pointers/3-get_op_func.c | true | 200 | 470 | #include "3-calc.h"
#include <stdlib.h>
/**
* get_op_func - selects the correct function to perform
* @s: the operation asked by the user.
*
* Return: pointer to the function that corresponds to the operator
*/
int (*get_op_func(char *s))(int, int)
{
op_t ops[] = {
{"+", op_add},
{"-", op_sub},
{"*", op_mul... | 3 |
mbjay89/alx-low_level_programming | c7845e3 | 0x13-more_singly_linked_lists/4-free_listint.c | C | www.github.com/mbjay89/alx-low_level_programming/tree/main/0x13-more_singly_linked_lists/4-free_listint.c | https://raw.githubusercontent.com/mbjay89/alx-low_level_programming/c7845e3/0x13-more_singly_linked_lists/4-free_listint.c | mbjay89/alx-low_level_programming c7845e3 0x13-more_singly_linked_lists/4-free_listint.c | true | 200 | 241 | #include "lists.h"
/**
* free_listint - frees a linked list
* @head: head of a list
* Return: N/A
*/
void free_listint(listint_t *head)
{
listint_t *temp;
while ((temp = head) != NULL)
{
head = head->next;
free(temp);
}
}
| 1 |
Temple30/simple_shell | 5af7f81 | errors1.c | C | www.github.com/Temple30/simple_shell/tree/main/errors1.c | https://raw.githubusercontent.com/Temple30/simple_shell/5af7f81/errors1.c | Temple30/simple_shell 5af7f81 errors1.c | true | 200 | 2,611 | #include "shell.h"
/**
* _erratoi - translates a string into an integer.
* @s: the string that needs to be converted
* Return: 0 if there are no numbers in the string,
* otherwise -1 in the event of an error
*
*/
int _erratoi(char *s)
{
int j = 0;
unsigned long int result = 0;
if (*s == '+')
s++; /* TODO:... | 4 |
zhengyang92/loops | bfcabb6 | srcs.iaca.wholeloop/6635.c | C | www.github.com/zhengyang92/loops/tree/main/srcs.iaca.wholeloop/6635.c | https://raw.githubusercontent.com/zhengyang92/loops/bfcabb6/srcs.iaca.wholeloop/6635.c | zhengyang92/loops bfcabb6 srcs.iaca.wholeloop/6635.c | true | 200 | 569 | #include "../iacaMarks.h"
#include <stdint.h>
#include <stdio.h>
typedef __uint8_t uint8_t;
int
fn (int y, int16_t basis[64][64], int i, int x, uint8_t * perm, int j)
{
IACA_START for (x = 0; x < 8; x++)
{
double s = 0.25 * (1 << 16);
int index = 8 * i + j;
int perm_index = perm[index];
... | 2 |
defyMiy/TeachC | 9a5c17d | HW1.c | C | www.github.com/defyMiy/TeachC/tree/main/HW1.c | https://raw.githubusercontent.com/defyMiy/TeachC/9a5c17d/HW1.c | defyMiy/TeachC 9a5c17d HW1.c | true | 200 | 8,501 | // รวม array
// เรียงตัวเลข
// นับเลขซ้ำ
#include <stdio.h>
// dict
// 1. array อาเรย์ = ชุดข้อมูล
// 2. %d คือการจองพืนที่ชนิดตัวเลข (integer) เพื่อรับค่า(&ตัวแปร) หรือแสดงผล(ตัวแปร)
// 3. printf("hello world %d", ตัวแปร) แสดงค่าในแท๊กข้อความและตัวแปร
// 4. scanf("%d", &ตัวแปร) รับค่าชนิด integer แล้วเก็บค่า... | 0 |
itu-itis23-ciftcia22/repo1 | 48ef1fe | C/week4.1.c | C | www.github.com/itu-itis23-ciftcia22/repo1/tree/main/C/week4.1.c | https://raw.githubusercontent.com/itu-itis23-ciftcia22/repo1/48ef1fe/C/week4.1.c | itu-itis23-ciftcia22/repo1 48ef1fe C/week4.1.c | true | 200 | 584 | #include <stdio.h>
#include <stdlib.h>
int main ()
{
const double acilis = 24.75; // tl
const double unit_basi = 1.76; // tl
const double unit_uzaklik = 0.1 ; // km
const double min_ucret = 90; // tl
double uzaklik = 0;
printf("Uzakligi gririniz: ");
scanf("%lf", &uzaklik);
double price = acilis + (i... | 3 |
testAZtest/IdGen | 90f27a9 | IdGen.h | C | www.github.com/testAZtest/IdGen/tree/main/IdGen.h | https://raw.githubusercontent.com/testAZtest/IdGen/90f27a9/IdGen.h | testAZtest/IdGen 90f27a9 IdGen.h | true | 200 | 1,449 | //gcc -shared -o libsum.dll sum.c
//gcc -L. -o abc.exe main.c -lsum
// gcc -Lbuild -o IdGen_test.exe IdGen_test.c -lIdGenLib
//Выполняет генерацию идентификаторов по указанным правилам с учетом "черного списка" для букв и цифр
//
#ifndef __IdGen_h__
#define __IdGen_h__
#include <ctype.h>
#include <string.h>
... | 6 |
GabrielSiqueira1/PC1_C-Programming-Language | db511da | files/e17.c | C | www.github.com/GabrielSiqueira1/PC1_C-Programming-Language/tree/main/files/e17.c | https://raw.githubusercontent.com/GabrielSiqueira1/PC1_C-Programming-Language/db511da/files/e17.c | GabrielSiqueira1/PC1_C-Programming-Language db511da files/e17.c | true | 200 | 3,305 | //Gabriel Siqueira Silva - 20203008814
//Programa que utiliza a matriz criada no exerc�cio 16 para realizar tarefas de dist�ncia
/*
L�gica - Como � necess�rio uma fun��o, nela deve conter a quantidade de cidades que uma determinada pessoa perambulou e as cidades que foram visitadas, no entanto, como a matriz est� sa... | 5 |
Theophilousjoy/alx-low_level_programming | 07bd3c2 | 0x0F-function_pointers/0-print_name.c | C | www.github.com/Theophilousjoy/alx-low_level_programming/tree/main/0x0F-function_pointers/0-print_name.c | https://raw.githubusercontent.com/Theophilousjoy/alx-low_level_programming/07bd3c2/0x0F-function_pointers/0-print_name.c | Theophilousjoy/alx-low_level_programming 07bd3c2 0x0F-function_pointers/0-print_name.c | true | 200 | 303 | #include "function_pointers.h"
#include<stdlib.h>
#include <stdio.h>
/**
* print_name - Writing a function that prints a name
* @name: name to be printed
* @f: pointer to a function
* Return: void
*/
void print_name(char *name, void (*f)(char *))
{
if (name == NULL || f == NULL)
return;
f(name);
}
| 7 |
EzzagmounyAZIZ/alx-low_level_programming | d994495 | 0x12-singly_linked_lists/3-add_node_end.c | C | www.github.com/EzzagmounyAZIZ/alx-low_level_programming/tree/main/0x12-singly_linked_lists/3-add_node_end.c | https://raw.githubusercontent.com/EzzagmounyAZIZ/alx-low_level_programming/d994495/0x12-singly_linked_lists/3-add_node_end.c | EzzagmounyAZIZ/alx-low_level_programming d994495 0x12-singly_linked_lists/3-add_node_end.c | true | 200 | 650 | #include <stdlib.h>
#include <string.h>
#include "lists.h"
/**
* add_node_end - adds a new node at the end of a linked list
* @head: double pointer to the list_t list
* @str: string to put in the new node
*
* Return: address of the new element, or NULL if it failed
*/
list_t *add_node_end(list_t **head, const ch... | 1 |
vincenzobucciero/Programming-I | 8763619 | STRING_MATCHING/main.c | C | www.github.com/vincenzobucciero/Programming-I/tree/main/STRING_MATCHING/main.c | https://raw.githubusercontent.com/vincenzobucciero/Programming-I/8763619/STRING_MATCHING/main.c | vincenzobucciero/Programming-I 8763619 STRING_MATCHING/main.c | true | 200 | 396 | #include <stdio.h>
#include <stdlib.h>
#include "header.h"
int main()
{
int i, n_occorrenze;
char mio_testo[100], mia_chiave[50];
printf("Inserisci la chiave:\n");
gets(mia_chiave);
printf("Inserisci il testo:\n");
gets(mio_testo);
n_occorrenze=string_matching(mia_chiave... | 4 |
scallyw4g/bonsai | d838c7d | generated/string_and_value_tables_particle_spawn_type.h | C | www.github.com/scallyw4g/bonsai/tree/main/generated/string_and_value_tables_particle_spawn_type.h | https://raw.githubusercontent.com/scallyw4g/bonsai/d838c7d/generated/string_and_value_tables_particle_spawn_type.h | scallyw4g/bonsai d838c7d generated/string_and_value_tables_particle_spawn_type.h | true | 200 | 1,698 | // src/engine/editor.cpp:165:0
link_internal counted_string
ToStringPrefixless(particle_spawn_type Type)
{
counted_string Result = {};
switch (Type)
{
case ParticleSpawnType_None: { Result = CSz("None"); } break;
case ParticleSpawnType_Random: { Result = CSz("Random"); } break;
case ParticleSpawnType... | 2 |
LloydN01/Spotlight-for-Linux | 70b94e4 | build.c | C | www.github.com/LloydN01/Spotlight-for-Linux/tree/main/build.c | https://raw.githubusercontent.com/LloydN01/Spotlight-for-Linux/70b94e4/build.c | LloydN01/Spotlight-for-Linux 70b94e4 build.c | true | 200 | 4,832 | #include "trove.h"
HASHTABLE *hashtable;
// reads the hashtable struct by struct and compresses data using gzip -> adds the compressed data to trove-file
void writeToTrove(HASHTABLE *hashtable, char *trovename){
// writeToTrove() was inspired from https://www.geeksforgeeks.org/readwrite-structure-file-c/
pri... | 0 |
Khatwangadhareddy/My-C-programs | ec7b494 | sizeuni.c | C | www.github.com/Khatwangadhareddy/My-C-programs/tree/main/sizeuni.c | https://raw.githubusercontent.com/Khatwangadhareddy/My-C-programs/ec7b494/sizeuni.c | Khatwangadhareddy/My-C-programs ec7b494 sizeuni.c | true | 200 | 921 | #include <stdio.h>
#include <string.h>
int main() {
char str1[] = "Good Morning";
char str2[] = "REVA University";
char str3[] = "REVA";
// 1) To reverse the string str1
printf("1) Reversed str1: ");
strrev(str1);
printf("%s\n", str1);
// 2) To concatenate str1 with str2
printf("2... | 3 |
HamzaEl24/ContactManagement_Proj | 9070d97 | SERIE_2/exercice_4.c | C | www.github.com/HamzaEl24/ContactManagement_Proj/tree/main/SERIE_2/exercice_4.c | https://raw.githubusercontent.com/HamzaEl24/ContactManagement_Proj/9070d97/SERIE_2/exercice_4.c | HamzaEl24/ContactManagement_Proj 9070d97 SERIE_2/exercice_4.c | true | 200 | 759 | #include<stdio.h>
#include<stdlib.h>
#define N 10
int main(){
int Tab[N], i ,temp,min;
int j ;
printf("Donner les elementes du tableau :\n");
for(i = 0 ; i<N ; i++){
printf("Tab[%d] = ",i);
scanf("%d",&Tab[i]);
}
for ( i=0 ; i<N-1 ; i++){
... | 6 |
Eng-MeMe/Cooling-system | 9f93a02 | Code/Slave/HAL/LCD/LCD.h | C | www.github.com/Eng-MeMe/Cooling-system/tree/main/Code/Slave/HAL/LCD/LCD.h | https://raw.githubusercontent.com/Eng-MeMe/Cooling-system/9f93a02/Code/Slave/HAL/LCD/LCD.h | Eng-MeMe/Cooling-system 9f93a02 Code/Slave/HAL/LCD/LCD.h | true | 200 | 1,603 | #ifndef MCAL_LCD_H_
#define MCAL_LCD_H_
#include <avr/io.h>
#include "../../UTLIS/Common_Macros.h"
#include "../../UTLIS/Std_Types.h"
#include "../../MCAL/DIO/DIO.h"
/***************************************************************************************************/
/****************************************... | 7 |
ciel0217/AtCoder | 560d598 | ABC134_B.c | C | www.github.com/ciel0217/AtCoder/tree/main/ABC134_B.c | https://raw.githubusercontent.com/ciel0217/AtCoder/560d598/ABC134_B.c | ciel0217/AtCoder 560d598 ABC134_B.c | true | 200 | 161 | #include <stdio.h>
int main(){
int n,d;
scanf("%d%d",&n,&d);
int s=d*2+1;
int count=0;
if(n%s>=1)count++;
printf("%d\n",n/s+count);
return 0;
} | 1 |
KnowitIZ/iz-kista-krac-stm32-esp8266 | 116eb2c | Core/Src/ESP8266_HAL.c | C | www.github.com/KnowitIZ/iz-kista-krac-stm32-esp8266/tree/main/Core/Src/ESP8266_HAL.c | https://raw.githubusercontent.com/KnowitIZ/iz-kista-krac-stm32-esp8266/116eb2c/Core/Src/ESP8266_HAL.c | KnowitIZ/iz-kista-krac-stm32-esp8266 116eb2c Core/Src/ESP8266_HAL.c | true | 200 | 8,538 | /*
* ESP8266_HAL.c
*
* Created on: 2024-10-19
* Author: Greenhouse - Knowit
* (used code from Controllerstech)
*/
#include "UartRingbuffer_multi.h"
#include "ESP8266_HAL.h"
#include "stdio.h"
#include "string.h"
extern UART_HandleTypeDef huart1;
extern UART_HandleTypeDef huart2;
extern TIM_HandleType... | 4 |
Minchu0809/llvm-Projects | 6690215 | StructDLO/Testcase/define .h | C | www.github.com/Minchu0809/llvm-Projects/tree/main/StructDLO/Testcase/define .h | https://raw.githubusercontent.com/Minchu0809/llvm-Projects/6690215/StructDLO/Testcase/define%20.h | Minchu0809/llvm-Projects 6690215 StructDLO/Testcase/define .h | true | 200 | 263 | typedef struct {
int size;
int isColomnMajor;
double sum;
int arraySize;
int staticArray[200];
long lb;
float *array;
char arrayName[100];
long ub;
int bias;
} ArrayInfo;
void init(ArrayInfo *arrayInfo);
void populate(ArrayInfo *arrayInfo);
| 2 |
busayoadebola/alx-low_level_programming | 2214ddd | 0x13-more_singly_linked_lists/6-pop_listint.c | C | www.github.com/busayoadebola/alx-low_level_programming/tree/main/0x13-more_singly_linked_lists/6-pop_listint.c | https://raw.githubusercontent.com/busayoadebola/alx-low_level_programming/2214ddd/0x13-more_singly_linked_lists/6-pop_listint.c | busayoadebola/alx-low_level_programming 2214ddd 0x13-more_singly_linked_lists/6-pop_listint.c | true | 200 | 369 | #include "lists.h"
/**
* pop_listint - to delete the head node and display the
* new head node's data
* @head: the node to delete
* Return: the new node data
*/
int pop_listint(listint_t **head)
{
listint_t *tmp;
int num;
if (head == NULL || *head == NULL)
return (0);
num = (*head)->n;
tmp = (*head)->nex... | 0 |
yemmycode/binary_trees | a3b979f | 110-binary_tree_is_bst.c | C | www.github.com/yemmycode/binary_trees/tree/main/110-binary_tree_is_bst.c | https://raw.githubusercontent.com/yemmycode/binary_trees/a3b979f/110-binary_tree_is_bst.c | yemmycode/binary_trees a3b979f 110-binary_tree_is_bst.c | true | 200 | 919 | #include "limits.h"
#include "binary_trees.h"
/**
* is_bst_helper - Determines if a binary tree is a valid binary search tree.
* @tree: pointer to the root node of the tree to assess.
* @lo: value of the smallest visited node.
* @hi: value of the largest visited node.
*
* Return: 1 if the tree is a valid BST, 0 ... | 6 |
SevvalAtes54/Programming-Languages | 5d8b7f9 | HOMEWORK-1-main/HOMEWORK1 Q3/HOMEWORK1 Q3/main.c | C | www.github.com/SevvalAtes54/Programming-Languages/tree/main/HOMEWORK-1-main/HOMEWORK1 Q3/HOMEWORK1 Q3/main.c | https://raw.githubusercontent.com/SevvalAtes54/Programming-Languages/5d8b7f9/HOMEWORK-1-main/HOMEWORK1%20Q3/HOMEWORK1%20Q3/main.c | SevvalAtes54/Programming-Languages 5d8b7f9 HOMEWORK-1-main/HOMEWORK1 Q3/HOMEWORK1 Q3/main.c | true | 200 | 414 | //
// main.c
// HOMEWORK1 Q3
//
// Created by my computer on 10.12.2022.
//
#include <stdio.h>
int main(int argc, const char * argv[]) {
// Determine and Output Whether Number N is Even or Odd.
int N;
printf("Bir sayi giriniz");
scanf("%d",&N);
if(N%2==0){
printf("N çift bir sa... | 3 |
Nneka-Mallo/alx-low_level_programming | 95870b2 | 0x07-pointers_arrays_strings/8-print_diagsums.c | C | www.github.com/Nneka-Mallo/alx-low_level_programming/tree/main/0x07-pointers_arrays_strings/8-print_diagsums.c | https://raw.githubusercontent.com/Nneka-Mallo/alx-low_level_programming/95870b2/0x07-pointers_arrays_strings/8-print_diagsums.c | Nneka-Mallo/alx-low_level_programming 95870b2 0x07-pointers_arrays_strings/8-print_diagsums.c | true | 200 | 497 | #include "main.h"
#include <stdio.h>
/**
* print_diagsums - Prints the sum of the two diagonals.
* of a square matrix of integers.
* @a: The matrix of integers.
* @size: The size of the matrix.
*/
void print_diagsums(int *a, int size)
{
int index, sum1 = 0, sum2 = 0;
for (index = 0; index < si... | 1 |
NXP/wifi_nxp | 9f5a276 | port/net/netif_decl.h | C | www.github.com/NXP/wifi_nxp/tree/main/port/net/netif_decl.h | https://raw.githubusercontent.com/NXP/wifi_nxp/9f5a276/port/net/netif_decl.h | NXP/wifi_nxp 9f5a276 port/net/netif_decl.h | true | 200 | 4,356 | /*
* Copyright 2008-2022 NXP
*
* SPDX-License-Identifier: BSD-3-Clause
*
*/
#include <mlan_api.h>
#include <wm_net.h>
#include <wmlog.h>
#ifdef RW610
#include <wifi-imu.h>
#else
#include <wifi-sdio.h>
#endif
#include <wifi-internal.h>
#if defined(SDK_OS_FREE_RTOS)
#include "lwip/opt.h"
#include "lwip/def.h"
#... | 4 |
Jayakumar93/C_Language | 3ddbc49 | cprograms/arrays/copy_ele.c | C | www.github.com/Jayakumar93/C_Language/tree/main/cprograms/arrays/copy_ele.c | https://raw.githubusercontent.com/Jayakumar93/C_Language/3ddbc49/cprograms/arrays/copy_ele.c | Jayakumar93/C_Language 3ddbc49 cprograms/arrays/copy_ele.c | true | 200 | 606 | /*Write a C program to copy all elements from an array to another array.*/
#include<stdio.h>
void main()
{
int arr1[50],arr2[50],j,i,size;
printf("Enter the size of Array:\n");
scanf("%d",&size);
printf("Enter the Elements in the Array1:\n");
for(i=0; i<size; i++)
{
scanf("%d",&arr1[i]);
arr2[i]=arr1[i];
}... | 2 |
junaid2712/c-assignment | 81688a9 | sunbeam assignment 8/assign8pg3.c | C | www.github.com/junaid2712/c-assignment/tree/main/sunbeam assignment 8/assign8pg3.c | https://raw.githubusercontent.com/junaid2712/c-assignment/81688a9/sunbeam%20assignment%208/assign8pg3.c | junaid2712/c-assignment 81688a9 sunbeam assignment 8/assign8pg3.c | true | 200 | 1,548 | /*Write a function to accept array of student’s information from the user. Write another function
to print the array student’s information. Re-use these functions in rest of the assignments
wherever required.*/
#include <stdio.h>
// Define a structure to store student information
struct Student {
int rollNumber;
... | 0 |
PouletHalal/MyRPG | 55a1976 | src/portals/init_portals.c | C | www.github.com/PouletHalal/MyRPG/tree/main/src/portals/init_portals.c | https://raw.githubusercontent.com/PouletHalal/MyRPG/55a1976/src/portals/init_portals.c | PouletHalal/MyRPG 55a1976 src/portals/init_portals.c | true | 200 | 1,852 | /*
** EPITECH PROJECT, 2024
** MyRPG
** File description:
** init_portals
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "temp.h"
#include "error_handling.h"
#include "portals.h"
static int get_arg(char **split, world_t *world, entity_t *entity, char *line)
{
if (split == NULL || split[0] ... | 6 |
Willy-22/alx-low_level_programming | 855b936 | 0x07-pointers_arrays_strings/2-strchr.c | C | www.github.com/Willy-22/alx-low_level_programming/tree/main/0x07-pointers_arrays_strings/2-strchr.c | https://raw.githubusercontent.com/Willy-22/alx-low_level_programming/855b936/0x07-pointers_arrays_strings/2-strchr.c | Willy-22/alx-low_level_programming 855b936 0x07-pointers_arrays_strings/2-strchr.c | true | 200 | 313 | #include "main.h"
#include <stddef.h>
/**
* _strchr - locates character in a string
* @s: pointer to string
* @c: character to be found
* Return: s or NULL
*/
char *_strchr(char *s, char c)
{
int i;
for (i = 0; s[i] >= '\0'; i++)
{
if (s[i] == c)
{
return (s + i);
}
}
return (NULL);
}
| 3 |
joshualee8/EECS-348-Lab-5 | 86cf299 | nfl_scoring_combos.c | C | www.github.com/joshualee8/EECS-348-Lab-5/tree/main/nfl_scoring_combos.c | https://raw.githubusercontent.com/joshualee8/EECS-348-Lab-5/86cf299/nfl_scoring_combos.c | joshualee8/EECS-348-Lab-5 86cf299 nfl_scoring_combos.c | true | 200 | 2,513 | #include <stdio.h>
int main() {
// declare variable to store user input (the desired score)
int score;
// declare and initialize array of possible scores
const int scores[] = {8, 7, 6, 3, 2};
// declare and initialize array of names for each score
const char* scoreNames[] = {"TD + 2pt", "TD... | 1 |
ipssachin/C-Swayam | a76c47a | c_booleans.c | C | www.github.com/ipssachin/C-Swayam/tree/main/c_booleans.c | https://raw.githubusercontent.com/ipssachin/C-Swayam/a76c47a/c_booleans.c | ipssachin/C-Swayam a76c47a c_booleans.c | true | 200 | 675 | #include<stdbool.h>
#include<stdio.h>
int main(){
/* Bool is not built in data type hence it needs to be imported*/
bool isCodingFun = true;
bool isSunCool = false;
printf("%d\n", isCodingFun);
printf("%d \n", isSunCool);
printf("%d\n", 10 == 10); // Returns 1 (true), because 10 is equal to ... | 4 |
henriquetorrescampos/cs50_harvard | 44b1f7f | c/dataStruct/linked_list.c | C | www.github.com/henriquetorrescampos/cs50_harvard/tree/main/c/dataStruct/linked_list.c | https://raw.githubusercontent.com/henriquetorrescampos/cs50_harvard/44b1f7f/c/dataStruct/linked_list.c | henriquetorrescampos/cs50_harvard 44b1f7f c/dataStruct/linked_list.c | true | 200 | 585 | #include <stdio.h>
#include <stdlib.h>
typedef struct node
{
int number;
struct node *next;
} node;
int main(int argc, char *argv[])
{
node *list = NULL;
for (int i = 1; i < argc; i++)
{
int number = atoi(argv[i]);
node *n = malloc(sizeof(node));
if (n == NULL)
{
... | 2 |
digvijay59/codespaces-blank | bf94159 | c programs fromm 31st oct/31oct-1st nov/bitwise6.c | C | www.github.com/digvijay59/codespaces-blank/tree/main/c programs fromm 31st oct/31oct-1st nov/bitwise6.c | https://raw.githubusercontent.com/digvijay59/codespaces-blank/bf94159/c%20programs%20fromm%2031st%20oct/31oct-1st%20nov/bitwise6.c | digvijay59/codespaces-blank bf94159 c programs fromm 31st oct/31oct-1st nov/bitwise6.c | true | 200 | 519 | #include<stdio.h>
int main()
{
int a;
printf("enter a integer\n");
scanf("%x\n",&a);
printf("the number entered is %x\n",a);
int b;
b=a&(0x0f000000);
b=b>>20;
int c;
c=a&(0x000000f0);
c=c>>4;
int d;
d=a&(0x00000f00);
d=d>>4;
int e;
e=a&(0x00... | 6 |
menna676/alx-low_level_programming | e5ec90e | 0x13-more_singly_linked_lists/2-add_nodeint.c | C | www.github.com/menna676/alx-low_level_programming/tree/main/0x13-more_singly_linked_lists/2-add_nodeint.c | https://raw.githubusercontent.com/menna676/alx-low_level_programming/e5ec90e/0x13-more_singly_linked_lists/2-add_nodeint.c | menna676/alx-low_level_programming e5ec90e 0x13-more_singly_linked_lists/2-add_nodeint.c | true | 200 | 414 | #include "lists.h"
/**
* add_nodeint - add new node in the beginning of linked list
* @head: pointer to the first node in linked list
* @n: data to add in the new node
* Return: pointer to new node, or NULL when it fails
*/
listint_t *add_nodeint(listint_t **head, const int n)
{
listint_t *new;
new = malloc(sizeof(list... | 0 |
akshaymandalik/SolvedProblems | a4a3bec | C/program85.c | C | www.github.com/akshaymandalik/SolvedProblems/tree/main/C/program85.c | https://raw.githubusercontent.com/akshaymandalik/SolvedProblems/a4a3bec/C/program85.c | akshaymandalik/SolvedProblems a4a3bec C/program85.c | true | 200 | 935 | // find out last occurence of a Number
#include<stdio.h>
#include<stdlib.h>
int LastOccurence(int Arr[],int iSize,int iValue){
int iCnt = 0;
for(iCnt = iSize-1;iCnt>= 0;iCnt--){
if(Arr[iCnt]== iValue){
break;
}
}
if(iCnt == -1){
... | 3 |
Withakash/StaticStack | 0ac1a01 | TestStaticStack.C | C | www.github.com/Withakash/StaticStack/tree/main/TestStaticStack.C | https://raw.githubusercontent.com/Withakash/StaticStack/0ac1a01/TestStaticStack.C | Withakash/StaticStack 0ac1a01 TestStaticStack.C | true | 200 | 831 | #include"StaticStack.c"
int main()
{
int choice;
item_type item;
stack s;
init(&s);
while(1)
{
clrscr();
puts("1. PUSH");
puts("2. POP");
puts("3. PEEK");
puts("4. SIZE");
puts("5. EXIT");
printf("Enter your choice: ");
scanf("%d",&choice);
switc... | 1 |
Evance262/low_level_programming | 26fa761 | 0x05-pointers_arrays_strings/3-puts.c | C | www.github.com/Evance262/low_level_programming/tree/main/0x05-pointers_arrays_strings/3-puts.c | https://raw.githubusercontent.com/Evance262/low_level_programming/26fa761/0x05-pointers_arrays_strings/3-puts.c | Evance262/low_level_programming 26fa761 0x05-pointers_arrays_strings/3-puts.c | true | 200 | 225 | #include "holberton.h"
/**
* _puts - function that prints a string
*
* @str: pointer to char
* Return: nothing
*/
void _puts(char *str)
{
int i = 0;
while (str[i] != '\0')
{
_putchar(str[i]);
i += 1;
}
_putchar('\n');
}
| 4 |
Mshinde14/Total_Programs | dafd43e | Assignment17Ex2.c | C | www.github.com/Mshinde14/Total_Programs/tree/main/Assignment17Ex2.c | https://raw.githubusercontent.com/Mshinde14/Total_Programs/dafd43e/Assignment17Ex2.c | Mshinde14/Total_Programs dafd43e Assignment17Ex2.c | true | 200 | 312 | #include<stdio.h>
void Pattern(int iNo)
{
int iCnt = 0;
for(iCnt = iNo; iCnt >= 1; iCnt--)
{
printf("%d\t#\t",iCnt);
}
}
int main()
{
int iValue = 0;
printf("Enter number of elements : \n");
scanf("%d",&iValue);
Pattern(iValue);
return 0;
} | 6 |
ermaccer/MKDHook | 6ad7144 | MKDHook/scripthook.c | C | www.github.com/ermaccer/MKDHook/tree/main/MKDHook/scripthook.c | https://raw.githubusercontent.com/ermaccer/MKDHook/6ad7144/MKDHook/scripthook.c | ermaccer/MKDHook 6ad7144 MKDHook/scripthook.c | true | 200 | 14,894 | #include "scripthook.h"
#include "mkdeception.h"
#include <stdio.h>
#include "ps2mem.h"
#include "mips.h"
#include "sound.h"
#include "characters/character_list.h"
#include "types.h"
int script_function_table[TOTAL_COMMANDS] = { 0 };
int debugVar[4] = { 0 };
int cached_aux_weapon[2] = { 0 };
void init_script_hook()
{... | 0 |
TryingToBeSmart/Producer-and-Consumer | c81f362 | producer_and_consumer.c | C | www.github.com/TryingToBeSmart/Producer-and-Consumer/tree/main/producer_and_consumer.c | https://raw.githubusercontent.com/TryingToBeSmart/Producer-and-Consumer/c81f362/producer_and_consumer.c | TryingToBeSmart/Producer-and-Consumer c81f362 producer_and_consumer.c | true | 200 | 4,393 | #include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <errno.h>
#include <pthread.h>
#include <fcntl.h>
#include <semaphore.h>
#include <sys/mman.h>
#include <signal.h>
int WAKEUP = SIGUSR1;
sigset_t sigSet;
pid_t otherPid;
pthread_mutex_t mutex;
// Shared Circular Buffer. Each e... | 3 |
sugyeong98/Raspi | 90fdb29 | button4_isr_twobutton.c | C | www.github.com/sugyeong98/Raspi/tree/main/button4_isr_twobutton.c | https://raw.githubusercontent.com/sugyeong98/Raspi/90fdb29/button4_isr_twobutton.c | sugyeong98/Raspi 90fdb29 button4_isr_twobutton.c | true | 200 | 1,369 | #include <stdio.h>
#include <wiringPi.h>
#include <stdlib.h>
#include <signal.h>
#define RED 7
#define GREEN 8
#define YELLOW 9
#define SW 2
#define OW 1
int mode = 0;
int intv = 2; //2~9
int time; //delay yime interval(MS)
int stop = 1;
int ps[40]; //pin state, pin number ; 40 // default 0(reset 0)
void Tog... | 1 |
amine-niouar/fract-ol | 5517f6a | fractol.c | C | www.github.com/amine-niouar/fract-ol/tree/main/fractol.c | https://raw.githubusercontent.com/amine-niouar/fract-ol/5517f6a/fractol.c | amine-niouar/fract-ol 5517f6a fractol.c | true | 200 | 2,808 | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* fractol.c :+: :+: :+: ... | 2 |
tmatthey/booga | d466342 | framework/glosmesa/src/winpos.C | C | www.github.com/tmatthey/booga/tree/main/framework/glosmesa/src/winpos.C | https://raw.githubusercontent.com/tmatthey/booga/d466342/framework/glosmesa/src/winpos.C | tmatthey/booga d466342 framework/glosmesa/src/winpos.C | true | 200 | 3,440 | /* $Id: winpos.c,v 1.5 1997/07/24 01:31:39 brianp Exp $ */
/*
* Mesa 3-D graphics library
* Version: 2.4
* Copyright (C) 1995-1997 Brian Paul
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Softw... | 4 |
vvent7/PTR-AV3 | 2adc00c | src/analytics.c | C | www.github.com/vvent7/PTR-AV3/tree/main/src/analytics.c | https://raw.githubusercontent.com/vvent7/PTR-AV3/2adc00c/src/analytics.c | vvent7/PTR-AV3 2adc00c src/analytics.c | true | 200 | 2,065 | #include <stdio.h>
#include <pthread.h>
#include "analytics.h"
#include "client.h"
#include "ingredient.h"
#include "misc.h"
static Analytics a;
pthread_mutex_t mutexAnalytics;
void analytics_init(){
a.clientsServed = 0;
a.clientsLost = 0;
a.clientsWaitMin = 0;
a.clientsWaitMax = 0;
a.clientsWaitAvg = 0;
... | 0 |
dengwj11/Usb-Keyboard | 8d9d91d | 00_USB_KEYBOARD/APP/DeepCool_driver/at32_spi.h | C | www.github.com/dengwj11/Usb-Keyboard/tree/main/00_USB_KEYBOARD/APP/DeepCool_driver/at32_spi.h | https://raw.githubusercontent.com/dengwj11/Usb-Keyboard/8d9d91d/00_USB_KEYBOARD/APP/DeepCool_driver/at32_spi.h | dengwj11/Usb-Keyboard 8d9d91d 00_USB_KEYBOARD/APP/DeepCool_driver/at32_spi.h | true | 200 | 1,363 | #ifndef __AT32_SPI_H
#define __AT32_SPI_H
/* Includes ------------------------------------------------------------------*/
#include "at32f402_405.h"
//#include "delay.h"
/*SPI1���Ŷ���
* PB6---CS
* PB8---SCLK
* PB5---MOSI
* PB7---SPI_D/C
* PA12---OLED_RST
*/
#define SPI_CLK_PIN GPIO_PINS_8
#defi... | 6 |
mohamed-Fathy1/printf | 431ac32 | precision.c | C | www.github.com/mohamed-Fathy1/printf/tree/main/precision.c | https://raw.githubusercontent.com/mohamed-Fathy1/printf/431ac32/precision.c | mohamed-Fathy1/printf 431ac32 precision.c | true | 200 | 577 | #include "main.h"
/**
* getPrecision - precision for printing
* @fmt: input
* @index: input
* @type: input
* Return: int
*/
int getPrecision(const char *fmt, int *index, va_list type)
{
int curr_i = *index + 1;
int prec = -1;
if (fmt[curr_i] != '.')
return (prec);
prec = 0;
for (curr_i += 1; fmt[curr_i... | 3 |
cj4ck/42-fractol | f8d5c65 | src/pxl.c | C | www.github.com/cj4ck/42-fractol/tree/main/src/pxl.c | https://raw.githubusercontent.com/cj4ck/42-fractol/f8d5c65/src/pxl.c | cj4ck/42-fractol f8d5c65 src/pxl.c | true | 200 | 2,218 | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* pxl.c :+: :+: :+: ... | 1 |
MobinTGR8/MyProjects | 91ebf3d | C Problems and Exercises/Chapter 10 User-Defined Functions/WP/10.3.c | C | www.github.com/MobinTGR8/MyProjects/tree/main/C Problems and Exercises/Chapter 10 User-Defined Functions/WP/10.3.c | https://raw.githubusercontent.com/MobinTGR8/MyProjects/91ebf3d/C%20Problems%20and%20Exercises/Chapter%2010%20User-Defined%20Functions/WP/10.3.c | MobinTGR8/MyProjects 91ebf3d C Problems and Exercises/Chapter 10 User-Defined Functions/WP/10.3.c | true | 200 | 783 | void printline (char ch, int len);
value (float, float, int);
main()
{
printf("Name: MD. Mobin Haque\nID:2102064\n\n");
float principal, inrate, amount;
int period;
printf("Enter principal amount, interest");
printf("rate, and period\n");
scanf("%f %f %d", &principal, &inrate, &period);
printline ('*' , 52);... | 2 |
mahmoudhmoud/alx-low_level_programming | b4ad153 | 0x0E-structures_typedef/4-new_dog.c | C | www.github.com/mahmoudhmoud/alx-low_level_programming/tree/main/0x0E-structures_typedef/4-new_dog.c | https://raw.githubusercontent.com/mahmoudhmoud/alx-low_level_programming/b4ad153/0x0E-structures_typedef/4-new_dog.c | mahmoudhmoud/alx-low_level_programming b4ad153 0x0E-structures_typedef/4-new_dog.c | true | 200 | 1,157 | #include <stdlib.h>
#include "dog.h"
/**
* _strlen - string katakhdo
* @str: string howa
* Return: str lih
*/
int _strlen(const char *str)
{
int length = 0;
while (*str++)
length++;
return (length);
}
/**
* _strcopy - kayansakh deset
*
* @src: naskho
* @dest: string diro hna
*
* Return: @dest
*/... | 4 |
Fz-Victorious/philosophers | ff44995 | main_bonus.c | C | www.github.com/Fz-Victorious/philosophers/tree/main/main_bonus.c | https://raw.githubusercontent.com/Fz-Victorious/philosophers/ff44995/main_bonus.c | Fz-Victorious/philosophers ff44995 main_bonus.c | true | 200 | 2,742 | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main_bonus.c :+: :+: :+: ... | 0 |
Dave-Gom/libreriasC | 39b94f6 | librerias/estructurasAutoreferenciadas/ListasEnlazadas/funcionesListas.c | C | www.github.com/Dave-Gom/libreriasC/tree/main/librerias/estructurasAutoreferenciadas/ListasEnlazadas/funcionesListas.c | https://raw.githubusercontent.com/Dave-Gom/libreriasC/39b94f6/librerias/estructurasAutoreferenciadas/ListasEnlazadas/funcionesListas.c | Dave-Gom/libreriasC 39b94f6 librerias/estructurasAutoreferenciadas/ListasEnlazadas/funcionesListas.c | true | 200 | 10,013 | /**
* @brief Funciones de Manipulacion de Listas Enlazadas
*
* @author Dave Gomez
*/
#include"listas.h"
/**
* @brief Crea un nodo de una lista y devuelve su direccion en memoria
*
* @param dato Dato a ser insertado en el Nodo, dependiendo del tipo de nodo puede ser un Registro, entero, cadena, o cualquier ... | 6 |
BudaBecker/aulas-ceub-C | 248a9c2 | ta_seq_22452347_Gabriel_Becker/ex_04_1_seq_ta_22452347_Gabriel_Becker.c | C | www.github.com/BudaBecker/aulas-ceub-C/tree/main/ta_seq_22452347_Gabriel_Becker/ex_04_1_seq_ta_22452347_Gabriel_Becker.c | https://raw.githubusercontent.com/BudaBecker/aulas-ceub-C/248a9c2/ta_seq_22452347_Gabriel_Becker/ex_04_1_seq_ta_22452347_Gabriel_Becker.c | BudaBecker/aulas-ceub-C 248a9c2 ta_seq_22452347_Gabriel_Becker/ex_04_1_seq_ta_22452347_Gabriel_Becker.c | true | 200 | 224 | #include <stdio.h>
int main(void){
float p1, p2;
printf("Qual a primeira nota? ");
scanf("%f",&p1);
printf("\nQual a segunda nota? ");
scanf("%f",&p2);
printf("\nMedia final: %.2f",(p1+p2)/2);
}
| 1 |
jiwook021/RPI_Linux_Driver-Userspace | 4526f9c | app/Platform_LED_driver_app/Platform_LED_driver_app.c | C | www.github.com/jiwook021/RPI_Linux_Driver-Userspace/tree/main/app/Platform_LED_driver_app/Platform_LED_driver_app.c | https://raw.githubusercontent.com/jiwook021/RPI_Linux_Driver-Userspace/4526f9c/app/Platform_LED_driver_app/Platform_LED_driver_app.c | jiwook021/RPI_Linux_Driver-Userspace 4526f9c app/Platform_LED_driver_app/Platform_LED_driver_app.c | true | 200 | 921 | // app_misc.c
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <fcntl.h>
// 생성된 장치파일 위치 및 이름
#define NODE_NAME "/dev/Platform_LED"
int main(int argc, char** argv)
{
int buf;
if (argc <= 1) {
printf("Usage : ./out on or off\n");
return -1;
}
... | 2 |
LUISVILL02/AutPractice | 078be63 | tuberiasPreview/comandos/comants.c | C | www.github.com/LUISVILL02/AutPractice/tree/main/tuberiasPreview/comandos/comants.c | https://raw.githubusercontent.com/LUISVILL02/AutPractice/078be63/tuberiasPreview/comandos/comants.c | LUISVILL02/AutPractice 078be63 tuberiasPreview/comandos/comants.c | true | 200 | 1,055 | #include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
int main(int argc, char **argv){
int tuberia[2];
pipe(tuberia);
pid_t hijo = fork();
if (hijo == -1){
printf("error\n");
exit(EXIT_FAILURE);
}
if (hij... | 4 |
theduyngx/RPC-protocol | efbf615 | client-server/client.c | C | www.github.com/theduyngx/RPC-protocol/tree/main/client-server/client.c | https://raw.githubusercontent.com/theduyngx/RPC-protocol/efbf615/client-server/client.c | theduyngx/RPC-protocol efbf615 client-server/client.c | true | 200 | 2,940 | /*
* File : client.c
* Purpose : The client API.
*
* The provided API is a simple, bare-bone API which is only to demonstrate how the RPC interface
* functions. Edit the API to however desired, with the RPC interface in mind.
*/
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <getopt.h>
#... | 3 |
danibalo/alx-low_level_programming | 6277f91 | 0x07-pointers_arrays_strings/2-strchr.c | C | www.github.com/danibalo/alx-low_level_programming/tree/main/0x07-pointers_arrays_strings/2-strchr.c | https://raw.githubusercontent.com/danibalo/alx-low_level_programming/6277f91/0x07-pointers_arrays_strings/2-strchr.c | danibalo/alx-low_level_programming 6277f91 0x07-pointers_arrays_strings/2-strchr.c | true | 200 | 307 | #include "main.h"
/**
* _strchr - locates a character in a string
* @s: is a pointer to null terminated byte
* @c:a character to search for
* Return: zero
*/
char *_strchr(char *s, char c)
{
while (*s)
{
if (*s != c)
s++;
else
return (s);
}
if (c == '\0')
return (s);
return (NULL);
}
| 6 |
Hagareid79/alx-low_level_programming | 6c0a5a3 | 0x0C-more_malloc_free/3-array_range.c | C | www.github.com/Hagareid79/alx-low_level_programming/tree/main/0x0C-more_malloc_free/3-array_range.c | https://raw.githubusercontent.com/Hagareid79/alx-low_level_programming/6c0a5a3/0x0C-more_malloc_free/3-array_range.c | Hagareid79/alx-low_level_programming 6c0a5a3 0x0C-more_malloc_free/3-array_range.c | true | 200 | 399 | #include "main.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/**
**array_range - allocates memory
* @min: is a integer
* @max: is an integer
* Return: pointer of array
*/
int *array_range(int min, int max)
{
int x, y;
int *z;
if (min > max)
return (NULL);
x = max - min + 1;
z = malloc(sizeof(int) * ... | 0 |
Ncu-uu/VsCode | a071ab1 | C_C++Project/Date structure Experience/Ex2/LinkStack.c | C | www.github.com/Ncu-uu/VsCode/tree/main/C_C++Project/Date structure Experience/Ex2/LinkStack.c | https://raw.githubusercontent.com/Ncu-uu/VsCode/a071ab1/C_C%2B%2BProject/Date%20structure%20Experience/Ex2/LinkStack.c | Ncu-uu/VsCode a071ab1 C_C++Project/Date structure Experience/Ex2/LinkStack.c | true | 200 | 680 | #include <stdio.h>
#include <stdbool.h>
#include <stdlib.h>
//定义抽象数据类型函数状态代码
#define TRUE 1
#define FALSE 0
#define OK 1
#define ERROR 0
#define INFEASIBLE -1
#define OVERFLOW -2
typedef int Status;
typedef int ElemType;
//线性表的动态分配顺序存储结构
#define STACK_INIT_SIZE 100 //顺序栈存储空间的初始分配量
#define STACKINCREMENT 10 ... | 1 |
HenriqueSoares28/Learning-C | c4c5e12 | Lista 11/L11Ex08.c | C | www.github.com/HenriqueSoares28/Learning-C/tree/main/Lista 11/L11Ex08.c | https://raw.githubusercontent.com/HenriqueSoares28/Learning-C/c4c5e12/Lista%2011/L11Ex08.c | HenriqueSoares28/Learning-C c4c5e12 Lista 11/L11Ex08.c | true | 200 | 1,439 | #include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#define TAM_MAX 100
float mediaVetor(int vetor[], int c);
float porcentagemAcimaMedia(int vetor[], int media, int tam);
int main(){
system("cls");
int idades[TAM_MAX];
bool flag = true, erro = true;
int c =0 ;
while(flag){
while(e... | 4 |
deomoney3/Software-Systems-Assignments | b5210b6 | HOL-2/18.c | C | www.github.com/deomoney3/Software-Systems-Assignments/tree/main/HOL-2/18.c | https://raw.githubusercontent.com/deomoney3/Software-Systems-Assignments/b5210b6/HOL-2/18.c | deomoney3/Software-Systems-Assignments b5210b6 HOL-2/18.c | true | 200 | 2,636 | /*
============================================================================
Name : 18.c
Author : Deomani Singh
Description :18. Write a program to find out total number of directories on the pwd.
execute ls -l | grep ^d | wc ? Use only dup2.
Date: 20th Sep, 2024.
===================================================... | 2 |
jb-perrier/ft_penguin | 2be9b5d | a04/keyboard_dd.c | C | www.github.com/jb-perrier/ft_penguin/tree/main/a04/keyboard_dd.c | https://raw.githubusercontent.com/jb-perrier/ft_penguin/2be9b5d/a04/keyboard_dd.c | jb-perrier/ft_penguin 2be9b5d a04/keyboard_dd.c | true | 200 | 343 | #include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
MODULE_LICENSE("GPL2");
static int __init insert(void)
{
printk(KERN_INFO "keyboard_dd: Inserted keyboard !\n");
return (0);
}
static void __exit remove(void)
{
printk(KERN_INFO "keyboard_dd: Ejected keyboard !\n");
}
module_init(insert)... | 6 |
oelbouha/minishell | b406814 | src/executer/expand_and_join.c | C | www.github.com/oelbouha/minishell/tree/main/src/executer/expand_and_join.c | https://raw.githubusercontent.com/oelbouha/minishell/b406814/src/executer/expand_and_join.c | oelbouha/minishell b406814 src/executer/expand_and_join.c | true | 200 | 2,028 | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* expand_and_split.c :+: :+: :+: ... | 0 |
clodbrasilino/chatgpt-codesec-analysis | 517ed6c | collected_code/heal_round_2/to_be_healed/problem-748.c | C | www.github.com/clodbrasilino/chatgpt-codesec-analysis/tree/main/collected_code/heal_round_2/to_be_healed/problem-748.c | https://raw.githubusercontent.com/clodbrasilino/chatgpt-codesec-analysis/517ed6c/collected_code/heal_round_2/to_be_healed/problem-748.c | clodbrasilino/chatgpt-codesec-analysis 517ed6c collected_code/heal_round_2/to_be_healed/problem-748.c | true | 200 | 1,185 | #include <stdio.h>
#include <stdlib.h>
#include <regex.h>
#include <string.h>
void add_spaces(char *str) {
if(str == NULL)
return;
regex_t regex;
regcomp(®ex, "[A-Z]", REG_EXTENDED);
/* Possible weaknesses found:
* Does not handle strings that are not \0-terminated; if given one it ... | 1 |
Hossam-N/OS-Project | a3b7ebf | OS-Project/MLF.h | C | www.github.com/Hossam-N/OS-Project/tree/main/OS-Project/MLF.h | https://raw.githubusercontent.com/Hossam-N/OS-Project/a3b7ebf/OS-Project/MLF.h | Hossam-N/OS-Project a3b7ebf OS-Project/MLF.h | true | 200 | 2,091 | #pragma once
#include "headers.h"
struct algorithm *initMLF();
bool mlfAddProcess(struct ProcessData prcs);
struct ProcessData mlfGetCurrentProcess();
struct ProcessData mlfPreemptProcess(struct ProcessData currProcess) { return currProcess; }
bool isMLFQueueEmpty();
// Remove process will be end quantum
bo... | 3 |
Temitope-Kupoluyi/alx-low_level_programming | a108b75 | 0x01-variables_if_else_while/9-print_comb.c | C | www.github.com/Temitope-Kupoluyi/alx-low_level_programming/tree/main/0x01-variables_if_else_while/9-print_comb.c | https://raw.githubusercontent.com/Temitope-Kupoluyi/alx-low_level_programming/a108b75/0x01-variables_if_else_while/9-print_comb.c | Temitope-Kupoluyi/alx-low_level_programming a108b75 0x01-variables_if_else_while/9-print_comb.c | true | 200 | 287 | #include <stdio.h>
/**
* main - prints all combinations possible of single-digits numbers
* Return: Always 0 (success)
*/
int main(void)
{
int n;
for (n = 48; n < 58; n++)
{
putchar(n);
if (n != 57)
{
putchar(',');
putchar(' ');
}
}
putchar('\n');
return (0);
}
| 4 |
Mahbub2001/C-Programs-All-Topics-With-Exercise | fe0c3bf | C program/prac19.c | C | www.github.com/Mahbub2001/C-Programs-All-Topics-With-Exercise/tree/main/C program/prac19.c | https://raw.githubusercontent.com/Mahbub2001/C-Programs-All-Topics-With-Exercise/fe0c3bf/C%20program/prac19.c | Mahbub2001/C-Programs-All-Topics-With-Exercise fe0c3bf C program/prac19.c | true | 200 | 780 | #include <stdio.h>
int main()
{
float numbers[5];
int negative=0, positive=0;
printf("Enter the first number : \n");
scanf("%f", &numbers[0]);
printf("Enter the second number : \n");
scanf("%f", &numbers[1]);
printf("Enter the third number : \n");
scanf("%f", &numbers[2]);
print... | 5 |
thomcleary/learn-c | e641b52 | c-programming-a-modern-approach/20-low-level-programming/exercises/12.c | C | www.github.com/thomcleary/learn-c/tree/main/c-programming-a-modern-approach/20-low-level-programming/exercises/12.c | https://raw.githubusercontent.com/thomcleary/learn-c/e641b52/c-programming-a-modern-approach/20-low-level-programming/exercises/12.c | thomcleary/learn-c e641b52 c-programming-a-modern-approach/20-low-level-programming/exercises/12.c | true | 200 | 919 | #include <stdio.h>
#include <assert.h>
/*
The following function supposedly combines two bytes to form an unsigned short integer.
Explain why the function doesn't work and show how to fix it
*/
unsigned short create_short(unsigned char high_byte, unsigned char low_byte)
{
// '+' has a higher precedence than '<<'
... | 6 |
einergehtnochrein/ra-firmware | 8af9d63 | src/imet/imet54.c | C | www.github.com/einergehtnochrein/ra-firmware/tree/main/src/imet/imet54.c | https://raw.githubusercontent.com/einergehtnochrein/ra-firmware/8af9d63/src/imet/imet54.c | einergehtnochrein/ra-firmware 8af9d63 src/imet/imet54.c | true | 200 | 13,609 |
#include <inttypes.h>
#include <math.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include "lpclib.h"
#include "bsp.h"
#include "sys.h"
#include "imet54.h"
#include "imet54private.h"
#include "bch.h"
/*
* iMet-54 frame parameters (from firmware analysis)
*
* 2FSK, 4800 bit/s, 2.5... | 2 |
eliooooooo/C-Training | 999506f | Basics/main.c | C | www.github.com/eliooooooo/C-Training/tree/main/Basics/main.c | https://raw.githubusercontent.com/eliooooooo/C-Training/999506f/Basics/main.c | eliooooooo/C-Training 999506f Basics/main.c | true | 200 | 3,223 | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
// Ex 1
void print_infos()
{
char name[100];
char dob[100];
char num[100];
printf("Enter your name: ");
scanf("%s", name);
printf("Enter your date of birth: ");
scanf("%s", dob);
printf("Enter yout mobile: ");... | 0 |
stanislas1200/cub3d | a7dd774 | src/bonus/get_file_bonus.c | C | www.github.com/stanislas1200/cub3d/tree/main/src/bonus/get_file_bonus.c | https://raw.githubusercontent.com/stanislas1200/cub3d/a7dd774/src/bonus/get_file_bonus.c | stanislas1200/cub3d a7dd774 src/bonus/get_file_bonus.c | true | 200 | 2,455 | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* get_file_bonus.c :+: :+: :+: ... | 1 |
biswajit862002/C_Practical_Assignment_for_MCA_1st_Sem | 13e6599 | Q24.c | C | www.github.com/biswajit862002/C_Practical_Assignment_for_MCA_1st_Sem/tree/main/Q24.c | https://raw.githubusercontent.com/biswajit862002/C_Practical_Assignment_for_MCA_1st_Sem/13e6599/Q24.c | biswajit862002/C_Practical_Assignment_for_MCA_1st_Sem 13e6599 Q24.c | true | 200 | 667 | // write a program to read a string and check for palimdrome without using string related function (a string is [palimdrome if its half is mirror by itself eg: malayalam)
#include<stdio.h>
#include<string.h>
int isPalimdrome(char []);
int main()
{
char str[50];
printf("Enter any string : ");
gets(str);
... | 3 |
SkwalExe/game-of-life-c | 92fd63c | src/utils.c | C | www.github.com/SkwalExe/game-of-life-c/tree/main/src/utils.c | https://raw.githubusercontent.com/SkwalExe/game-of-life-c/92fd63c/src/utils.c | SkwalExe/game-of-life-c 92fd63c src/utils.c | true | 200 | 1,500 | //
// Created by skwal on 8/10/22.
//
#include "utils.h"
#include <stdio.h>
#include <time.h>
#include <stdbool.h>
#include <stdlib.h>
#if defined(_WIN32)
#include <windows.h>
#elif defined(__linux__)
#include <sys/ioctl.h>
#include <unistd.h>
#endif // Windows/Linux
void get_terminal_size(int *width, int *height)
... | 5 |
google/pebble | 4051c5b | tests/fw/services/test_timezone_database.c | C | www.github.com/google/pebble/tree/main/tests/fw/services/test_timezone_database.c | https://raw.githubusercontent.com/google/pebble/4051c5b/tests/fw/services/test_timezone_database.c | google/pebble 4051c5b tests/fw/services/test_timezone_database.c | true | 200 | 4,779 | /*
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to i... | 2 |
gitul0515/JavaScript | 385fe22 | 자료구조와알고리즘/자료구조/7_그래프/3_무방향그래프_인접행렬.c | C | www.github.com/gitul0515/JavaScript/tree/main/자료구조와알고리즘/자료구조/7_그래프/3_무방향그래프_인접행렬.c | https://raw.githubusercontent.com/gitul0515/JavaScript/385fe22/%EC%9E%90%EB%A3%8C%EA%B5%AC%EC%A1%B0%EC%99%80%EC%95%8C%EA%B3%A0%EB%A6%AC%EC%A6%98/%EC%9E%90%EB%A3%8C%EA%B5%AC%EC%A1%B0/7_%EA%B7%B8%EB%9E%98%ED%94%84/3_%EB%AC%B4%EB%B0%A9%ED%96%A5%EA%B7%B8%EB%9E%98%ED%94%84_%EC%9D%B8%EC%A0%91%ED%96%89%EB%A0%AC.c | gitul0515/JavaScript 385fe22 자료구조와알고리즘/자료구조/7_그래프/3_무방향그래프_인접행렬.c | true | 200 | 1,448 | // 무방향 그래프 (인접 행렬 사용)
#include<stdio.h>
#include<stdlib.h>
#define MAX_VERTICES 50
typedef struct GraphType {
int n; // 정점의 개수
int adj_mat[MAX_VERTICES][MAX_VERTICES];
} GraphType;
// 그래프 초기화
void init(GraphType* g) {
int r, c;
g->n = 0; // 정점의 개수를 0으로 초기화
for (r = 0; r < MAX_VERTICES; r++)
for (c = 0;... | 6 |
KallDrexx/PicoGpuV1 | 333fbe8 | main.c | C | www.github.com/KallDrexx/PicoGpuV1/tree/main/main.c | https://raw.githubusercontent.com/KallDrexx/PicoGpuV1/333fbe8/main.c | KallDrexx/PicoGpuV1 333fbe8 main.c | true | 200 | 647 | #include "pico/stdlib.h"
#include "hardware/gpio.h"
#include "hardware/spi.h"
#include "ili9341.h"
#define DISPLAY_RESET_PIN 28
#define DISPLAY_DC_PIN 27
#define DISPLAY_LED_PIN 26
#define DISPLAY_SPI_TX_PIN 19
#define DISPLAY_SPI_SCK_PIN 18
#define DISPLAY_SPI_CS_PIN 17
#define SPI_PORT spi0
int main()
{
stdio_init... | 7 |
Drakhull/INF029-IuriViana | c06c12b | .ccls-cache/@home@runner@INF029-IuriViana/lista_recursao@q10.c | C | www.github.com/Drakhull/INF029-IuriViana/tree/main/.ccls-cache/@home@runner@INF029-IuriViana/lista_recursao@q10.c | https://raw.githubusercontent.com/Drakhull/INF029-IuriViana/c06c12b/.ccls-cache/%40home%40runner%40INF029-IuriViana/lista_recursao%40q10.c | Drakhull/INF029-IuriViana c06c12b .ccls-cache/@home@runner@INF029-IuriViana/lista_recursao@q10.c | true | 200 | 692 | #include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
int ocorrencias(int num, int num_buscado){
if(num == num_buscado){
return true;
}
else return false;
}
int separar_numeros(int num, int num_buscado, int qtd){
int num_copia;
int ocorre;
if(num != 0){
ocorre = ocorrencias(num%10, num_busca... | 0 |
3wood0218/finalproject | df5d4cc | scene/character_select.c | C | www.github.com/3wood0218/finalproject/tree/main/scene/character_select.c | https://raw.githubusercontent.com/3wood0218/finalproject/df5d4cc/scene/character_select.c | 3wood0218/finalproject df5d4cc scene/character_select.c | true | 200 | 2,390 | #include "character_select.h"
#include "global.h"
#include <allegro5/allegro_primitives.h>
#include <allegro5/allegro_font.h>
#include <allegro5/allegro_ttf.h>
#include <allegro5/allegro_image.h>
typedef struct CharacterSelect {
ALLEGRO_FONT *font;
ALLEGRO_BITMAP *background;
int selected_character;
} Char... | 3 |
stekap000/dumb-graphics-library | be01f53 | examples/cursor_use.c | C | www.github.com/stekap000/dumb-graphics-library/tree/main/examples/cursor_use.c | https://raw.githubusercontent.com/stekap000/dumb-graphics-library/be01f53/examples/cursor_use.c | stekap000/dumb-graphics-library be01f53 examples/cursor_use.c | true | 200 | 2,164 | #define DGL_TARGET_WINDOWS
#define DGL_USE_ENGINE
#define DGL_IMPLEMENTATION
#include "dgl.h"
dgl_Simple_Model *loaded_sm;
dgl_Point3D loaded_sm_translation = {0};
dgl_Point3D loaded_sm_inverse_translation = {0};
float loaded_sm_angle_x;
float loaded_sm_angle_y;
float loaded_sm_angle_z;
dgl_Mat proj_mat = {0};
void ... | 1 |
LycorisDev/c_app_bigerrno | 7968e19 | parser/interpreter/pl_len.c | C | www.github.com/LycorisDev/c_app_bigerrno/tree/main/parser/interpreter/pl_len.c | https://raw.githubusercontent.com/LycorisDev/c_app_bigerrno/7968e19/parser/interpreter/pl_len.c | LycorisDev/c_app_bigerrno 7968e19 parser/interpreter/pl_len.c | true | 200 | 214 | #include "parser.h"
size_t get_pl_len(char **tokens)
{
size_t i;
size_t len;
i = 0;
len = 1;
while (pl_skip_parentheses(tokens, &i))
{
if (!ft_strcmp(tokens[i], "|"))
++len;
++i;
}
return (len);
}
| 4 |
sbaecker2005/exercicio | 1154a08 | ex8.c | C | www.github.com/sbaecker2005/exercicio/tree/main/ex8.c | https://raw.githubusercontent.com/sbaecker2005/exercicio/1154a08/ex8.c | sbaecker2005/exercicio 1154a08 ex8.c | true | 200 | 1,302 | #include <stdio.h>
#include <stdlib.h>
int* inverterArray(int *array, int tamanho) {
int *arrayInvertido = (int*)malloc(tamanho * sizeof(int));
if (arrayInvertido == NULL) {
printf("Erro: Falha ao alocar memória.\n");
return NULL;
}
for (int i = 0; i < tamanho; i++) {
*(arra... | 6 |
BrimVeyn/42sh | 240c73f | include/ft_regex.h | C | www.github.com/BrimVeyn/42sh/tree/main/include/ft_regex.h | https://raw.githubusercontent.com/BrimVeyn/42sh/240c73f/include/ft_regex.h | BrimVeyn/42sh 240c73f include/ft_regex.h | true | 200 | 2,165 | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_regex.h :+: :+: :+: ... | 7 |
Sudippdn/Labs | 6c08675 | Fourth Semester/TOC/Lab1.c | C | www.github.com/Sudippdn/Labs/tree/main/Fourth Semester/TOC/Lab1.c | https://raw.githubusercontent.com/Sudippdn/Labs/6c08675/Fourth%20Semester/TOC/Lab1.c | Sudippdn/Labs 6c08675 Fourth Semester/TOC/Lab1.c | true | 200 | 1,388 | //LAB 1: Program to construct a DFA that accepts the language L = {an | n >= 1}.
#include <stdio.h>
#include <string.h>
#define NUM_STATES 2
#define ALPHABET_SIZE 1
// DFA transition table
int transitionTable[NUM_STATES][ALPHABET_SIZE] = {
{1}, // From state 0, on input 'a', transition to state 1
... | 0 |
LJP-TW/SOS | 1e2898e | src/kernel/irq.c | C | www.github.com/LJP-TW/SOS/tree/main/src/kernel/irq.c | https://raw.githubusercontent.com/LJP-TW/SOS/1e2898e/src/kernel/irq.c | LJP-TW/SOS 1e2898e src/kernel/irq.c | true | 200 | 5,092 | #include <irq.h>
#include <mini_uart.h>
#include <utils.h>
#include <timer.h>
#include <BCM2837.h>
#include <list.h>
#include <bitops.h>
#include <sched.h>
#include <current.h>
#define IRQ_TASK_NUM 32
typedef struct {
/* cb(args) */
void (*cb)(void *);
void *args;
/* Priority, the lowest priority is 0... | 4 |
nasergamal/alx-low_level_programming | 3d8591f | 0x07-pointers_arrays_strings/2-strchr.c | C | www.github.com/nasergamal/alx-low_level_programming/tree/main/0x07-pointers_arrays_strings/2-strchr.c | https://raw.githubusercontent.com/nasergamal/alx-low_level_programming/3d8591f/0x07-pointers_arrays_strings/2-strchr.c | nasergamal/alx-low_level_programming 3d8591f 0x07-pointers_arrays_strings/2-strchr.c | true | 200 | 420 | #include "main.h"
#include <stdio.h>
/**
* *_strchr - locate a character in a string
* @s: string to search
* @c: char to find
*
* Return: a pointer to the first occurrence of the character
* c in the strings s, or NULL if the character is not found
*/
char *_strchr(char *s, char c)
{
int i;
for (i = 0;; i++... | 6 |
BrendoGarcia/Calculadora.C | 8c05091 | main.c | C | www.github.com/BrendoGarcia/Calculadora.C/tree/main/main.c | https://raw.githubusercontent.com/BrendoGarcia/Calculadora.C/8c05091/main.c | BrendoGarcia/Calculadora.C 8c05091 main.c | true | 200 | 1,013 | // preciso de ajuda para corrigir essa dupla apareção da linha 12 quando printa
// na pagina//
#include <stdio.h>
#include <stdlib.h>
int main() {
int num1, num2, soma, subtracao, multi, div, i;
char operador, cont;
i = 0;
for (i = 0; i < 10; i++) { // loop iniciando duas vezes//
printf("1=soma, 2=Multipl... | 7 |
Uzair-90/HSPSQL | 5a9b246 | uzair/book_solutions/chapt_17_tasks/linked_list.c | C | www.github.com/Uzair-90/HSPSQL/tree/main/uzair/book_solutions/chapt_17_tasks/linked_list.c | https://raw.githubusercontent.com/Uzair-90/HSPSQL/5a9b246/uzair/book_solutions/chapt_17_tasks/linked_list.c | Uzair-90/HSPSQL 5a9b246 uzair/book_solutions/chapt_17_tasks/linked_list.c | true | 200 | 1,745 | #include <stdio.h>
#include <stdlib.h>
struct node {
int data;
struct node *next;
};
struct node *add_to_list(struct node *list, int val) {
struct node *current = malloc(sizeof(struct node));
if (!current) {
printf("Memory allocation failed!\n");
exit(EXIT_FAILURE);
}
current-... | 0 |
ananthmuppidi/Shell | be5f953 | Controllers/autocomplete.c | C | www.github.com/ananthmuppidi/Shell/tree/main/Controllers/autocomplete.c | https://raw.githubusercontent.com/ananthmuppidi/Shell/be5f953/Controllers/autocomplete.c | ananthmuppidi/Shell be5f953 Controllers/autocomplete.c | true | 200 | 4,900 | #include "../Headers/root.h"
int compare (const void * a, const void * b) {
size_t fa = strlen((const char *)a);
size_t fb = strlen((const char *)b);
return (fa > fb) - (fa < fb);
}
void autoComplete(char command[], int len)
{
char options[1000][1000];
int idx = 0;
int entities = 0;
... | 4 |
hugocho14/Coding | e7d7619 | C/fahrenheit_to_celcius.c | C | www.github.com/hugocho14/Coding/tree/main/C/fahrenheit_to_celcius.c | https://raw.githubusercontent.com/hugocho14/Coding/e7d7619/C/fahrenheit_to_celcius.c | hugocho14/Coding e7d7619 C/fahrenheit_to_celcius.c | true | 200 | 218 | #include<stdio.h>
#include<math.h>
int main()
{
long double a,b;
printf("Write temperature in Fahrenheit: ");
scanf("%Lf",&a);
b = ((a-32)/1.8);
printf("Temperature in Celcius is: %0.3Lf\n",b);
return 0;
}
| 6 |
charteym/ALX-Wrong-Plag-simple_shell- | 599abde | memory.c | C | www.github.com/charteym/ALX-Wrong-Plag-simple_shell-/tree/main/memory.c | https://raw.githubusercontent.com/charteym/ALX-Wrong-Plag-simple_shell-/599abde/memory.c | charteym/ALX-Wrong-Plag-simple_shell- 599abde memory.c | true | 200 | 285 | #include "shell.h"
/**
* bfree - this helps to free a pointer and NULLs the address
* @ptr: this points to the address of the node
* Return: 1 if freed success ,if not 0.
*/
int bfree(void **ptr)
{
if (ptr && *ptr)
{
free(*ptr);
*ptr = NULL;
return (1);
}
return (0);
}
| 7 |
olekmali/ATMega328P | a94bee9 | 32_serial_int/serial_int/main.c | C | www.github.com/olekmali/ATMega328P/tree/main/32_serial_int/serial_int/main.c | https://raw.githubusercontent.com/olekmali/ATMega328P/a94bee9/32_serial_int/serial_int/main.c | olekmali/ATMega328P a94bee9 32_serial_int/serial_int/main.c | true | 200 | 1,341 | //* testing USART0 with receive data interrupt - main.c *
#include "bios_uart0_int.h"
#include "bios_leds.h"
#include <stdlib.h>
#include <avr/interrupt.h>
#define F_CPU (16000000UL)
#include <util/delay.h>
void MyCharReceivedFN (char c)
{
// This function is called from within an interrupt
// I... | 0 |
Fezzzzzzzz/alx-low_level_programming | 050d749 | 0x13-more_singly_linked_lists/0-print_listint.c | C | www.github.com/Fezzzzzzzz/alx-low_level_programming/tree/main/0x13-more_singly_linked_lists/0-print_listint.c | https://raw.githubusercontent.com/Fezzzzzzzz/alx-low_level_programming/050d749/0x13-more_singly_linked_lists/0-print_listint.c | Fezzzzzzzz/alx-low_level_programming 050d749 0x13-more_singly_linked_lists/0-print_listint.c | true | 200 | 310 | #include "lists.h"
/**
* print_listint - function that prints all the elements of a listint_t list.
* @h: pointer to the header of list
* Return: the number of nodes
*/
size_t print_listint(const listint_t *h)
{
size_t i = 0;
while (h)
{
printf("%d\n", h->n);
h = h->next;
i++;
}
return (i);
}
| 4 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.