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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
martamakes/42-exam-rank-02 | 81c9513 | 02/Level2/swap_bits/grademe/test_main.c | C | www.github.com/martamakes/42-exam-rank-02/tree/main/02/Level2/swap_bits/grademe/test_main.c | https://raw.githubusercontent.com/martamakes/42-exam-rank-02/81c9513/02/Level2/swap_bits/grademe/test_main.c | martamakes/42-exam-rank-02 81c9513 02/Level2/swap_bits/grademe/test_main.c | true | 200 | 1,470 | // test_main.c
#include <stdio.h>
int g_tests_failed = 0;
// Prototipo de la función
unsigned char swap_bits(unsigned char octet);
// Función auxiliar para imprimir bits
void print_bits(unsigned char octet) {
for (int i = 7; i >= 0; i--)
printf("%d", (octet >> i) & 1);
}
void run_test(char *test_name, ... | 0 |
appsbymuss/binary_trees | 6016c8e | 12-binary_tree_leaves.c | C | www.github.com/appsbymuss/binary_trees/tree/main/12-binary_tree_leaves.c | https://raw.githubusercontent.com/appsbymuss/binary_trees/6016c8e/12-binary_tree_leaves.c | appsbymuss/binary_trees 6016c8e 12-binary_tree_leaves.c | true | 200 | 552 | #include "binary_trees.h"
/**
* binary_tree_leaves - Counts the number of leaves in a binary tree.
*
* @tree: Pointer to the root node of the tree to count leaves.
*
* Return: Number of leaves in the tree, or 0 if @tree is NULL.
*/
size_t binary_tree_leaves(const binary_tree_t *tree)
{
size_t righ_leaves, left... | 7 |
AhmedMAbuzaid1998/bank-database | 00b31c6 | print.c | C | www.github.com/AhmedMAbuzaid1998/bank-database/tree/main/print.c | https://raw.githubusercontent.com/AhmedMAbuzaid1998/bank-database/00b31c6/print.c | AhmedMAbuzaid1998/bank-database 00b31c6 print.c | true | 200 | 971 | #include <stdio.h>
#include "def.h"
void print_client(client *ptr)
{
printf("\t***printing a client details***\n");
int id,id_check=0;/*id this to receive the id when the empolyee wants to edit details of a client */
/*id_check contain number 0 to check if the id is founded or not*/
pr... | 4 |
techxrishabh/PROBLEM-SOLVING-IN-C | 7b9f8a3 | 168. return the kth smallest element of the array/smallest-element.c | C | www.github.com/techxrishabh/PROBLEM-SOLVING-IN-C/tree/main/168. return the kth smallest element of the array/smallest-element.c | https://raw.githubusercontent.com/techxrishabh/PROBLEM-SOLVING-IN-C/7b9f8a3/168.%20return%20the%20kth%20smallest%20element%20of%20the%20array/smallest-element.c | techxrishabh/PROBLEM-SOLVING-IN-C 7b9f8a3 168. return the kth smallest element of the array/smallest-element.c | true | 200 | 553 | // Given an integer array and an integer k where k <= size of array, We need to return the kth smallest element of the array.
#include <stdio.h>
int main(){
int k=3; // supposing that k = 3
int arr[5] = {4, 2, 8, 1, 6};
for (int i = 0; i < 5; i++)
{
for (int j = 0; j < 5; j++)
{
... | 2 |
mvac7/fR3eL_memory_MSX_Libraries | ef69adb | memory_Z80/sources/src/memory_Z80.c | C | www.github.com/mvac7/fR3eL_memory_MSX_Libraries/tree/main/memory_Z80/sources/src/memory_Z80.c | https://raw.githubusercontent.com/mvac7/fR3eL_memory_MSX_Libraries/ef69adb/memory_Z80/sources/src/memory_Z80.c | mvac7/fR3eL_memory_MSX_Libraries ef69adb memory_Z80/sources/src/memory_Z80.c | true | 200 | 3,892 | /* =============================================================================
Memory Z80 Library (fR3eL Project)
Version: 1.4 (10/12/2024)
Author: mvac7/303bcn
Architecture: MSX
Format: C Object (SDCC .rel)
Programming language: C and z80 assembler
Compiler: SDCC 4.4 or newer
Description:
Library with basic functi... | 7 |
Stanley-moses/alx-low_level_programming | 93329bf | 0x0B-malloc_free/101-strtow.c | C | www.github.com/Stanley-moses/alx-low_level_programming/tree/main/0x0B-malloc_free/101-strtow.c | https://raw.githubusercontent.com/Stanley-moses/alx-low_level_programming/93329bf/0x0B-malloc_free/101-strtow.c | Stanley-moses/alx-low_level_programming 93329bf 0x0B-malloc_free/101-strtow.c | true | 200 | 1,596 | #include "main.h"
#include <stdlib.h>
void util(char **, char *);
void create_word(char **, char *, int, int, int);
/**
* strtow - a function that splits a string
* @str: the string
* Return: a pointer to an array of strings
*/
char **strtow(char *str)
{
int a, flag, len;
char **words;
if (str == NULL || str[0] == '... | 0 |
MahmoudZak3/alx-low_level_programming | 6ef4610 | 0x02-functions_nested_loops/5-sign.c | C | www.github.com/MahmoudZak3/alx-low_level_programming/tree/main/0x02-functions_nested_loops/5-sign.c | https://raw.githubusercontent.com/MahmoudZak3/alx-low_level_programming/6ef4610/0x02-functions_nested_loops/5-sign.c | MahmoudZak3/alx-low_level_programming 6ef4610 0x02-functions_nested_loops/5-sign.c | true | 200 | 334 | #include "main.h"
/**
* print_sign - printing num for check.
* @n: var for check
* Return: 1 & print + if x is greater than 0
* 0 and prints 0 if x is 0
*/
int print_sign(int n)
{
if (n > 0)
{
_putchar(43);
return (1);
}
else if (n == 0)
{
_putchar(48);
return (0);
}
else
{
_putchar(45);
retu... | 4 |
Minati2003/DS-PROGRAMS | 8848d1c | octaltodecimal.c | C | www.github.com/Minati2003/DS-PROGRAMS/tree/main/octaltodecimal.c | https://raw.githubusercontent.com/Minati2003/DS-PROGRAMS/8848d1c/octaltodecimal.c | Minati2003/DS-PROGRAMS 8848d1c octaltodecimal.c | true | 200 | 261 | // C program to demonstrate conversion of octal to decimal using format specifier
#include <stdio.h>
int main()
{
int n;
printf("Enter an Octal number: \n");
scanf("%o", &n);
printf("\nDecimal Representation is: %d", n);
return 0;
} | 2 |
emartinez-dev/push-swap | 0483057 | src/operations/rotates.c | C | www.github.com/emartinez-dev/push-swap/tree/main/src/operations/rotates.c | https://raw.githubusercontent.com/emartinez-dev/push-swap/0483057/src/operations/rotates.c | emartinez-dev/push-swap 0483057 src/operations/rotates.c | true | 200 | 1,881 | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* rotates.c :+: :+: :+: ... | 7 |
Bezawork-pr/alx-low_level_programming | 74f26ad | 0x0E-structures_typedef/4-new_dog.c | C | www.github.com/Bezawork-pr/alx-low_level_programming/tree/main/0x0E-structures_typedef/4-new_dog.c | https://raw.githubusercontent.com/Bezawork-pr/alx-low_level_programming/74f26ad/0x0E-structures_typedef/4-new_dog.c | Bezawork-pr/alx-low_level_programming 74f26ad 0x0E-structures_typedef/4-new_dog.c | true | 200 | 1,269 | #include "dog.h"
#include <stdlib.h>
/**
* lencount - counts len
*
* @s: takes string
*
* Return: length os string
*/
int lencount(char *s)
{
int i, count;
i = count = 0;
for (; s[i] != '\0'; i++)
{
count++;
}
count++;
return (count);
}
/**
* copystring - copies string
*
* @dest: to be copied to
*
... | 0 |
luwae/pixelflut_client | a40adca | src/client_2024.c | C | www.github.com/luwae/pixelflut_client/tree/main/src/client_2024.c | https://raw.githubusercontent.com/luwae/pixelflut_client/a40adca/src/client_2024.c | luwae/pixelflut_client a40adca src/client_2024.c | true | 200 | 7,399 | #include <sys/socket.h>
#include <stdio.h>
#include <stdlib.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <string.h>
#include <unistd.h>
#include <signal.h>
#include <time.h>
#include <stdlib.h>
#include <sys/mman.h>
#include <fcntl.h>
#ifdef CONNECTION_LOCAL
#define ADDRESS "127.0.0.1"
#define PORT 1337
... | 4 |
Infineon/REF_MTB_LV_Ceiling_Fan | 9a2dc05 | CF_SL_FOC_XMC13/PMSM_FOC/MIDSys/pmsm_foc_CFR_lib.c | C | www.github.com/Infineon/REF_MTB_LV_Ceiling_Fan/tree/main/CF_SL_FOC_XMC13/PMSM_FOC/MIDSys/pmsm_foc_CFR_lib.c | https://raw.githubusercontent.com/Infineon/REF_MTB_LV_Ceiling_Fan/9a2dc05/CF_SL_FOC_XMC13/PMSM_FOC/MIDSys/pmsm_foc_CFR_lib.c | Infineon/REF_MTB_LV_Ceiling_Fan 9a2dc05 CF_SL_FOC_XMC13/PMSM_FOC/MIDSys/pmsm_foc_CFR_lib.c | true | 200 | 10,589 | /**
* @file pmsm_foc_CFR_lib.c
* @date 28 Feb, 2022
*
* @cond
*********************************************************************************************************************
* PMSM FOC Motor Control Library
*
* Copyright (c) 2015-2020, Infineon Technologies AG
* All rights reserved.
*
* Redistribution ... | 2 |
Olcaytp/42_Piscine_Cursus | 9dc391e | 42_Piscine/c03/ex04/ft_strstrmain.c | C | www.github.com/Olcaytp/42_Piscine_Cursus/tree/main/42_Piscine/c03/ex04/ft_strstrmain.c | https://raw.githubusercontent.com/Olcaytp/42_Piscine_Cursus/9dc391e/42_Piscine/c03/ex04/ft_strstrmain.c | Olcaytp/42_Piscine_Cursus 9dc391e 42_Piscine/c03/ex04/ft_strstrmain.c | true | 200 | 556 | char *ft_strstr(char *str, char *to_find)
{
int i;
int j;
i = 0;
if (to_find[0] == '\0')
return (str);
while (str[i] != '\0')
{
j = 0;
while (str[i + j] == to_find[j] && str[i + j] != '\0')
{
if (to_find[j + 1] == '\0')
return (&str[i]);
j++;
}
i++;
}
return (0);
}
#include <stdio.h>
cha... | 7 |
pfreitasc/nesemu | 26a1983 | src/cartridge.c | C | www.github.com/pfreitasc/nesemu/tree/main/src/cartridge.c | https://raw.githubusercontent.com/pfreitasc/nesemu/26a1983/src/cartridge.c | pfreitasc/nesemu 26a1983 src/cartridge.c | true | 200 | 752 | #include "cartridge.h"
#include <stdio.h>
void Cartridge_getData(Cartridge *cartridge, char *filename) {
FILE *fgame;
fgame = fopen(filename, "rb");
//checking if file opened
if (fgame == NULL) {
printf("Couldn't open the file: %s\n", filename);
return;
}
fread(ca... | 0 |
MalekAjil/alx-low_level_programming | fe43df7 | 0x12-singly_linked_lists/0-print_list.c | C | www.github.com/MalekAjil/alx-low_level_programming/tree/main/0x12-singly_linked_lists/0-print_list.c | https://raw.githubusercontent.com/MalekAjil/alx-low_level_programming/fe43df7/0x12-singly_linked_lists/0-print_list.c | MalekAjil/alx-low_level_programming fe43df7 0x12-singly_linked_lists/0-print_list.c | true | 200 | 364 | #include <stdio.h>
#include "lists.h"
/**
* print_list - prints all elements of a list
* @h: the list's header.
* Return: number of list's elements.
*/
size_t print_list(const list_t *h)
{
int n = 0;
while (h != NULL)
{
if (h->str == NULL)
printf("[0] (nil)\n");
else
printf("[%d] %s\n", h->len, h->st... | 4 |
raheel2801/OS-EL | 7dc82ed | clock.c | C | www.github.com/raheel2801/OS-EL/tree/main/clock.c | https://raw.githubusercontent.com/raheel2801/OS-EL/7dc82ed/clock.c | raheel2801/OS-EL 7dc82ed clock.c | true | 200 | 2,086 | #include <stdio.h>
#include <stdlib.h>
//#define FRAME_SIZE 3 // Size of the page frame
typedef struct
{
int page;
int referenced;
} PageEntry;
int pageFaults(int pages[], int n)
{
int FRAME_SIZE;
printf("Enter the size of the page frame\n");
scanf("%d",&FRAME_SIZE);
PageEntry frame[FRAME_SIZ... | 2 |
csmoulaison/panelpon | c36a67d | src/input.c | C | www.github.com/csmoulaison/panelpon/tree/main/src/input.c | https://raw.githubusercontent.com/csmoulaison/panelpon/c36a67d/src/input.c | csmoulaison/panelpon c36a67d src/input.c | true | 200 | 1,920 | #include "input.h"
#include "stdio.h"
void input_poll(struct Input* input) {
for(int i = 0; i < input->mapped_btns_len; i++) {
input->mapped_btns[i]->just_pressed = false;
input->mapped_btns[i]->just_released = false;
}
SDL_Event e;
while(SDL_PollEvent(&e)) {
switch(e.type) {
case SDL... | 0 |
Arcidea0/minishell | a764802 | src/parser/args_split.c | C | www.github.com/Arcidea0/minishell/tree/main/src/parser/args_split.c | https://raw.githubusercontent.com/Arcidea0/minishell/a764802/src/parser/args_split.c | Arcidea0/minishell a764802 src/parser/args_split.c | true | 200 | 3,694 | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* args_split.c :+: :+: :+: ... | 7 |
Samuthe/alx-low_level_programming | 906bd35 | 0x07-pointers_arrays_strings/0-memset.c | C | www.github.com/Samuthe/alx-low_level_programming/tree/main/0x07-pointers_arrays_strings/0-memset.c | https://raw.githubusercontent.com/Samuthe/alx-low_level_programming/906bd35/0x07-pointers_arrays_strings/0-memset.c | Samuthe/alx-low_level_programming 906bd35 0x07-pointers_arrays_strings/0-memset.c | true | 200 | 305 | #include "main.h"
/**
* _memset - fills string with constant char b upto n bytes
* @s: input pointer to string
* @b: constant char
* @n: number of bytes
* Return: pointer to s string
*/
char *_memset(char *s, char b, unsigned int n)
{
unsigned int i = 0;
while (i < n)
{
s[i] = b;
i++;
}
return (s);
}
| 4 |
MostafaElsharkawy92/C_Programming_Mini_Projects | 2a14767 | Subject Grades_Sum and Display/Subject Grades Sum and Display.c | C | www.github.com/MostafaElsharkawy92/C_Programming_Mini_Projects/tree/main/Subject Grades_Sum and Display/Subject Grades Sum and Display.c | https://raw.githubusercontent.com/MostafaElsharkawy92/C_Programming_Mini_Projects/2a14767/Subject%20Grades_Sum%20and%20Display/Subject%20Grades%20Sum%20and%20Display.c | MostafaElsharkawy92/C_Programming_Mini_Projects 2a14767 Subject Grades_Sum and Display/Subject Grades Sum and Display.c | true | 200 | 1,191 | #include <stdio.h>
#include <stdlib.h>
struct students{
float math;
float science;
float arabic;
}stu1;
typedef struct students students;
int main(){
int n;
printf("Enter number of students :");
scanf("%d",&n);
students * ptr = (students*) malloc(n*sizeof(students));
f... | 2 |
N0M3KM/CPE_source_codes | 7c3e6c9 | CPE111/Lab_C/Week1_Algorithm/algorithm_week1.c | C | www.github.com/N0M3KM/CPE_source_codes/tree/main/CPE111/Lab_C/Week1_Algorithm/algorithm_week1.c | https://raw.githubusercontent.com/N0M3KM/CPE_source_codes/7c3e6c9/CPE111/Lab_C/Week1_Algorithm/algorithm_week1.c | N0M3KM/CPE_source_codes 7c3e6c9 CPE111/Lab_C/Week1_Algorithm/algorithm_week1.c | true | 200 | 6,193 | // 67070501016 & 67070501037 //
#include <stdio.h>
#include <math.h>
/* Insertion sort algorithm */
void insertionSort(int array[], int n) {
float tempValue;
int i, j, k;
// loop index from 1 to n-1
for (i=1; i < n; i++) {
j = 0;
tempValue = array[i];
// start the loop at j ... | 0 |
URVCompus2n/xd_pratica3 | b8be5d8 | client.c | C | www.github.com/URVCompus2n/xd_pratica3/tree/main/client.c | https://raw.githubusercontent.com/URVCompus2n/xd_pratica3/b8be5d8/client.c | URVCompus2n/xd_pratica3 b8be5d8 client.c | true | 200 | 2,388 | /** Codi solucio de la practica: CLIENT **/
/* Inclusio de fitxers .h habituals */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* Inclusio de fitxers .h per als sockets */
#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <uni... | 7 |
bwng0v0/C_Learning | 669bb33 | OJ/5oj/5-2.c | C | www.github.com/bwng0v0/C_Learning/tree/main/OJ/5oj/5-2.c | https://raw.githubusercontent.com/bwng0v0/C_Learning/669bb33/OJ/5oj/5-2.c | bwng0v0/C_Learning 669bb33 OJ/5oj/5-2.c | true | 200 | 403 | #include <stdio.h>
int main(){
int n,tmp;
scanf("%d",&n);
int arr[n*5];
for( int i=0; i<n*5; i++ ){
scanf("%d",&arr[i]);
}
for( int i=0; i<n*5-1; i++ ){
for( int j=0; j<n*5-1; j++ ){
if( arr[j] < arr[j+1] ){
tmp = arr[j];
arr[j] = arr[j+1];
arr[j+1] = tmp;
... | 4 |
0726hayate/School-Data-Structures-and-Algorithms-C | 11b0db3 | binarySearch.c | C | www.github.com/0726hayate/School-Data-Structures-and-Algorithms-C/tree/main/binarySearch.c | https://raw.githubusercontent.com/0726hayate/School-Data-Structures-and-Algorithms-C/11b0db3/binarySearch.c | 0726hayate/School-Data-Structures-and-Algorithms-C 11b0db3 binarySearch.c | true | 200 | 1,539 | #include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <math.h>
int binarySearch(int arr[], int low, int high, int target) {
//print contents of the array
printf("Index\tValue\n");
printf("----------------\n");
for (int i = 0; i < target; i++) {
printf("%d\t%d\n", i, arr[i]);
}
... | 2 |
robo-bebo/Embedded-AVR-Course | beb8ec5 | C_Programming/C3/LEC3_LAB4/main.c | C | www.github.com/robo-bebo/Embedded-AVR-Course/tree/main/C_Programming/C3/LEC3_LAB4/main.c | https://raw.githubusercontent.com/robo-bebo/Embedded-AVR-Course/beb8ec5/C_Programming/C3/LEC3_LAB4/main.c | robo-bebo/Embedded-AVR-Course beb8ec5 C_Programming/C3/LEC3_LAB4/main.c | true | 200 | 414 | /*Write C code that ask will ask the user to
enter the result of 3 x 4, In case the user
entered correct answer the program will
print Thanks, otherwise the program will
print try again until the user enters the
correct answer*/
#include<stdio.h>
void main(void)
{
int x = 0;
printf("enter the result of 3x4 : ");
w... | 0 |
pauwan-github/C-programming | 54e9b9c | C/bubble.c | C | www.github.com/pauwan-github/C-programming/tree/main/C/bubble.c | https://raw.githubusercontent.com/pauwan-github/C-programming/54e9b9c/C/bubble.c | pauwan-github/C-programming 54e9b9c C/bubble.c | true | 200 | 418 | #include<stdio.h>
int main(){
int arr[5], num, i, j, swap;
printf("Enter the number of elements:\n");
scanf("%d", &num);
printf("Entered %d numbers:\n", num);
for(i=0;i<num;i++)
scanf("%d", &arr[i]);
for(i=0; i<num-1; i++){
for(j=0;j<num-i-1; j++){
if (arr[j]>arr[j+1]){
swap=arr[j];
arr[j]=arr[j+1];
arr[j+... | 7 |
Sai-Mukhesh/mukhesh | 638022f | 08_binary_search_tree.c | C | www.github.com/Sai-Mukhesh/mukhesh/tree/main/08_binary_search_tree.c | https://raw.githubusercontent.com/Sai-Mukhesh/mukhesh/638022f/08_binary_search_tree.c | Sai-Mukhesh/mukhesh 638022f 08_binary_search_tree.c | true | 200 | 7,479 | #include <stdio.h>
#include <stdlib.h>
#include <time.h>
struct node {
int data; //node will store an integer
struct node *right_child; // right child
struct node *left_child; // left child
};
struct node* search(struct node *root, int x) {
if(root==NULL || root->data==x) //if root->data is x then the... | 4 |
Man0sh-r0y/Data-Structure-in-C | cffc211 | 02) Sorting/BubbleSort.c | C | www.github.com/Man0sh-r0y/Data-Structure-in-C/tree/main/02) Sorting/BubbleSort.c | https://raw.githubusercontent.com/Man0sh-r0y/Data-Structure-in-C/cffc211/02%29%20Sorting/BubbleSort.c | Man0sh-r0y/Data-Structure-in-C cffc211 02) Sorting/BubbleSort.c | true | 200 | 788 | #include <stdio.h>
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;
for (int i = 0; i < n - 1; i++) // For number of pass
{
for (int j = 0; j < n - 1 - i; j++) // For comparison i... | 2 |
veis-lzf/max30102_drivers | a4feea1 | si/MKB0908_Demo.si4project/Backup/pfv_max30102(6517).c | C | www.github.com/veis-lzf/max30102_drivers/tree/main/si/MKB0908_Demo.si4project/Backup/pfv_max30102(6517).c | https://raw.githubusercontent.com/veis-lzf/max30102_drivers/a4feea1/si/MKB0908_Demo.si4project/Backup/pfv_max30102%286517%29.c | veis-lzf/max30102_drivers a4feea1 si/MKB0908_Demo.si4project/Backup/pfv_max30102(6517).c | true | 200 | 11,316 | /*
* pfv_max30102.c
*
* Created on: Dec 10, 2023
* Author: veis
*/
#include "pfv_max30102.h"
#include "pfv_i2c.h"
#include "debug.h"
//#include <string.h>
MAX30102_Device_t g_MAX30102_Dev =
{
.m_address = max30102_WR_address,
.m_i2cx = I2C_Seq1,
};
uint8_t max30102_Bus_Write(uint8_t Register_Addres... | 0 |
suvadra23/learning_sea | a9d9417 | continuecalculator.c | C | www.github.com/suvadra23/learning_sea/tree/main/continuecalculator.c | https://raw.githubusercontent.com/suvadra23/learning_sea/a9d9417/continuecalculator.c | suvadra23/learning_sea a9d9417 continuecalculator.c | true | 200 | 1,811 | #include <stdio.h>
int main() {
char operator;
double num1, num2, result;
int continueCalculating = 1; // To control the loop
while (continueCalculating) {
// Prompt the user for input
printf("Enter first number: ");
scanf("%lf", &num1);
printf("Enter an op... | 7 |
Gorway/Assignments-C | 7b8659a | T122-130/T129.c | C | www.github.com/Gorway/Assignments-C/tree/main/T122-130/T129.c | https://raw.githubusercontent.com/Gorway/Assignments-C/7b8659a/T122-130/T129.c | Gorway/Assignments-C 7b8659a T122-130/T129.c | true | 200 | 5,256 | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
// Структура для представления даты
struct Date {
int day;
int month;
int year;
};
// Структура для представления персоны
struct Person {
char name[50];
char surname[50];
int age;
struct Date birthdate;
};
// Фун... | 4 |
int710/Zero_Basic_C | 293dcb1 | Struct/LibraryManagements/main.c | C | www.github.com/int710/Zero_Basic_C/tree/main/Struct/LibraryManagements/main.c | https://raw.githubusercontent.com/int710/Zero_Basic_C/293dcb1/Struct/LibraryManagements/main.c | int710/Zero_Basic_C 293dcb1 Struct/LibraryManagements/main.c | true | 200 | 4,587 | #include <stdio.h>
#include <string.h>
#define MAX 100
typedef struct {
char title[50];
char author[50];
int pubYear;
float coin;
} Book;
Book addBook() {
Book abook;
printf("\t Ten sach: ");
fflush(stdin);
gets(abook.title);
printf("\t Ten tac gia: ");
fflush(stdin);
get... | 2 |
Atharvadhake1/projects | c6d63cf | practical/Final/7{FIFO}/FIFO_P2.c | C | www.github.com/Atharvadhake1/projects/tree/main/practical/Final/7{FIFO}/FIFO_P2.c | https://raw.githubusercontent.com/Atharvadhake1/projects/c6d63cf/practical/Final/7%7BFIFO%7D/FIFO_P2.c | Atharvadhake1/projects c6d63cf practical/Final/7{FIFO}/FIFO_P2.c | true | 200 | 1,459 | #include <stdio.h>
#include <fcntl.h>
#include <string.h>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/types.h>
int main()
{
int fd1, fd2;
char myfifo1[] = "file1";
char myfifo2[] = "file2";
char str1[100] , str2[100] ;
int l = 0, w = 1, c = 0;
int i=0;
char ch;
... | 0 |
Ruchit-rt/CGroupProject | b4b1980 | arm11_13/src/instruction.h | C | www.github.com/Ruchit-rt/CGroupProject/tree/main/arm11_13/src/instruction.h | https://raw.githubusercontent.com/Ruchit-rt/CGroupProject/b4b1980/arm11_13/src/instruction.h | Ruchit-rt/CGroupProject b4b1980 arm11_13/src/instruction.h | true | 200 | 1,307 | #ifndef INSTRUCTION_H
#define INSTRUCTION_H
#include <stdbool.h>
#include "defns.h"
//SET OF TYPES OF INSTRUCTIONS
typedef enum {
DP,
MUL,
SDT,
BRA,
HAL,
NUL,
SPL
} inst_type_t;
//SET OF OPCODES
typedef enum {
AND = 0x0,
EOR = 0x1,
SUB = 0x2,
RSB = 0x3,
ADD = 0x4,
... | 7 |
SoftEngineerTeam/VulDegre | 612abff | Edge_processing/slicec_7edges_funcblock/src/main/java/sevenEdges/bad/d672f27c-8dc6-4f4e-9827-c95fafa53c1c.c | C | www.github.com/SoftEngineerTeam/VulDegre/tree/main/Edge_processing/slicec_7edges_funcblock/src/main/java/sevenEdges/bad/d672f27c-8dc6-4f4e-9827-c95fafa53c1c.c | https://raw.githubusercontent.com/SoftEngineerTeam/VulDegre/612abff/Edge_processing/slicec_7edges_funcblock/src/main/java/sevenEdges/bad/d672f27c-8dc6-4f4e-9827-c95fafa53c1c.c | SoftEngineerTeam/VulDegre 612abff Edge_processing/slicec_7edges_funcblock/src/main/java/sevenEdges/bad/d672f27c-8dc6-4f4e-9827-c95fafa53c1c.c | true | 200 | 492 | static void badSink()
{
char * data = CWE126_Buffer_Overread__malloc_char_memmove_45_badData;
{
char dest[100];
memset(dest, 'C', 100-1);
dest[100-1] = '\0'; /* null terminate */
/* POTENTIAL FLAW: using memmove with the length of the dest where data
* could be smaller t... | 4 |
kae1dy/C_PROJECTS | 2f67968 | contest01/01-3.c | C | www.github.com/kae1dy/C_PROJECTS/tree/main/contest01/01-3.c | https://raw.githubusercontent.com/kae1dy/C_PROJECTS/2f67968/contest01/01-3.c | kae1dy/C_PROJECTS 2f67968 contest01/01-3.c | true | 200 | 767 | #include <stdio.h>
#include <math.h>
enum
{
SIZE_MAX = 2000
};
static char
is_goodnprime(int N)
{
if (N <= 1 || N >= SIZE_MAX) return 0;
for (int i = 2; i <= (int) sqrt(N); ++i) {
if (N % i == 0) return 0;
}
return 1;
}
int
main(void)
{
int data[SIZE_MAX] = {};
int N;
if (sc... | 2 |
souelgha/42_fdf | 8f25d16 | src/algo_line.c | C | www.github.com/souelgha/42_fdf/tree/main/src/algo_line.c | https://raw.githubusercontent.com/souelgha/42_fdf/8f25d16/src/algo_line.c | souelgha/42_fdf 8f25d16 src/algo_line.c | true | 200 | 2,680 | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* algo_line.c :+: :+: :+: ... | 0 |
UiJosh20/alx-low_level_programming | 0cabea4 | 0x00-hello_world/101-quote.c | C | www.github.com/UiJosh20/alx-low_level_programming/tree/main/0x00-hello_world/101-quote.c | https://raw.githubusercontent.com/UiJosh20/alx-low_level_programming/0cabea4/0x00-hello_world/101-quote.c | UiJosh20/alx-low_level_programming 0cabea4 0x00-hello_world/101-quote.c | true | 200 | 250 | #include <stdio.h>
/**
* main - Entry point
*
* Description: 'It print a string without using printf'
*
* Return: Always 0 (Success)
*/
int main(void)
{
printf("and that piece of art is useful\" - Dora Korpar, 2015-10-19\n");
return (1);
}
| 7 |
sanika185/cprg | edefffe | whileloopex5.c | C | www.github.com/sanika185/cprg/tree/main/whileloopex5.c | https://raw.githubusercontent.com/sanika185/cprg/edefffe/whileloopex5.c | sanika185/cprg edefffe whileloopex5.c | true | 200 | 291 | //wap to print fibonancil series
#include<stdio.h>
void main()
{
int n,first,second,next;
printf("\n Enter nth value:");
scanf("%d",&n);
first=0;
second=1;
next=1;
while(next<=n)
{
next=first+second;
printf("\t %d",next);
first=second;
second=next;
}
}
| 5 |
Mutuapk/monty | 4b241c1 | helper_ops0.c | C | www.github.com/Mutuapk/monty/tree/main/helper_ops0.c | https://raw.githubusercontent.com/Mutuapk/monty/4b241c1/helper_ops0.c | Mutuapk/monty 4b241c1 helper_ops0.c | true | 200 | 336 | #include "monty.h"
/**
* digits_only - checks for non integer types in a string
* @str: string to check
* Return: 0 if it contains non integer type 1 if only integer type
*/
int digits_only(char *str)
{
int i;
for (i = 0; str[i]; i++)
if (isdigit(str[i]) == 0)
{
if (str[i] == '-' && i == 0)
continue;
return (0);
... | 6 |
Jonessw15/Language-C | c5dff5a | C/VScode/aulas/aula16/exercicio/ex3.c | C | www.github.com/Jonessw15/Language-C/tree/main/C/VScode/aulas/aula16/exercicio/ex3.c | https://raw.githubusercontent.com/Jonessw15/Language-C/c5dff5a/C/VScode/aulas/aula16/exercicio/ex3.c | Jonessw15/Language-C c5dff5a C/VScode/aulas/aula16/exercicio/ex3.c | true | 200 | 740 | #include <stdio.h>
#include <string.h>
typedef struct {
char nome[100];
int matricula;
float media;
} Aluno;
void cadastro(Aluno *);
void imprime(Aluno);
int main() {
Aluno al;
Aluno *alPtr = &al;
cadastro(alPtr);
imprime(al);
return 0;
}
void cadastro(Aluno *cadPtr) {
pri... | 1 |
BFarkascode/STM32_Bootloader | fd29601 | BootExternalController.c | C | www.github.com/BFarkascode/STM32_Bootloader/tree/main/BootExternalController.c | https://raw.githubusercontent.com/BFarkascode/STM32_Bootloader/fd29601/BootExternalController.c | BFarkascode/STM32_Bootloader fd29601 BootExternalController.c | true | 200 | 6,829 | /*
* Created on: 24 Oct 2023
* Author: BalazsFarkas
* Project: STM32_Bootloader
* Processor: STM32L053R8
* Program version: 1.0
* File: BootExternalController.c
* Modified from: N/A
* Change history:
*
* v.1.0
* UART1-based external controller.
*
*
*/
#include "BootExternalControl... | 4 |
nimisha-agarwal/refute_dataset | 1336e0c | filters/Count-primes[CP]/incorrect_solutions(failing_atleast_1_test)/d746c606-350a-11e5-b84e-0242ac110011_003.c | C | www.github.com/nimisha-agarwal/refute_dataset/tree/main/filters/Count-primes[CP]/incorrect_solutions(failing_atleast_1_test)/d746c606-350a-11e5-b84e-0242ac110011_003.c | https://raw.githubusercontent.com/nimisha-agarwal/refute_dataset/1336e0c/filters/Count-primes%5BCP%5D/incorrect_solutions%28failing_atleast_1_test%29/d746c606-350a-11e5-b84e-0242ac110011_003.c | nimisha-agarwal/refute_dataset 1336e0c filters/Count-primes[CP]/incorrect_solutions(failing_atleast_1_test)/d746c606-350a-11e5-b84e-0242ac110011_003.c | true | 200 | 1,053 | /*execute-result:OK*/
/*compile-errors:e158_278101.c:5:11: warning: unused variable 'a' [-Wunused-variable]
int x,a;
^
e158_278101.c:6:9: warning: unused variable 'count' [-Wunused-variable]
int count=1;
^
e158_278101.c:30:23: warning: if statement has empty body [-Wempty-body]
if(c==1... | 0 |
Devsstudent/mini_rt | 388b873 | src/edit/camera_edit.c | C | www.github.com/Devsstudent/mini_rt/tree/main/src/edit/camera_edit.c | https://raw.githubusercontent.com/Devsstudent/mini_rt/388b873/src/edit/camera_edit.c | Devsstudent/mini_rt 388b873 src/edit/camera_edit.c | true | 200 | 1,794 | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* camera_edit.c :+: :+: :+: ... | 2 |
Programmingpes/C | e5d7225 | Step06/Step06/01_pointer_operator.c | C | www.github.com/Programmingpes/C/tree/main/Step06/Step06/01_pointer_operator.c | https://raw.githubusercontent.com/Programmingpes/C/e5d7225/Step06/Step06/01_pointer_operator.c | Programmingpes/C e5d7225 Step06/Step06/01_pointer_operator.c | true | 200 | 406 | #include <stdio.h>
int main(void) {
int arr[] = { 3, 2, 5, 7, 6 };
int* ptr = arr;
printf("%d \n", *ptr + 1); // ������ ���� �� + 1
printf("%d \n", *(ptr + 1)); // ������ �� �ּҰ� ���� �� ������ ����
//*ptr++;// ���� �ƴ϶� �ּҰ��� ����
(* ptr)++;
for (int i = 0; i < 5; i++) {
printf("%d ", arr[i... | 3 |
bb2002/KNU_Lecture_2024_01_Data | ddeff8a | KNU_Lecture_2024_01_Data/arraylist1.c | C | www.github.com/bb2002/KNU_Lecture_2024_01_Data/tree/main/KNU_Lecture_2024_01_Data/arraylist1.c | https://raw.githubusercontent.com/bb2002/KNU_Lecture_2024_01_Data/ddeff8a/KNU_Lecture_2024_01_Data/arraylist1.c | bb2002/KNU_Lecture_2024_01_Data ddeff8a KNU_Lecture_2024_01_Data/arraylist1.c | true | 200 | 1,885 | #include <stdio.h>
#include <stdlib.h>
#define MAX_LIST_SIZE 100
typedef int Element;
typedef struct {
Element array[MAX_LIST_SIZE];
int size;
} ArrayListType;
void err(const char* msg) {
fprintf(stderr, "%s\n", msg);
exit(1);
}
void init(ArrayListType* L) {
L->size = 0;
}
int isEmpty(ArrayListType* L) {
ret... | 7 |
brijeshpytops/tops-assignments | cd99515 | MOD_3_c/conditional_logic_programs/q2.c | C | www.github.com/brijeshpytops/tops-assignments/tree/main/MOD_3_c/conditional_logic_programs/q2.c | https://raw.githubusercontent.com/brijeshpytops/tops-assignments/cd99515/MOD_3_c/conditional_logic_programs/q2.c | brijeshpytops/tops-assignments cd99515 MOD_3_c/conditional_logic_programs/q2.c | true | 200 | 350 | // 2. Write a C program to read the value of an integer m and display the value of n is 1 when m is larger than 0, 0 when m is 0 and -1 when m is less than 0
#include<stdio.h>
int main(){
int n;
int m=-11;
if(m<0){
n = -1;
}else if(m==0){
n = 0;
}else{
n = 1;
}
prin... | 5 |
Ilyasrf/1337 | 01ab7a0 | fizzbuzz/fizzbuzz.c | C | www.github.com/Ilyasrf/1337/tree/main/fizzbuzz/fizzbuzz.c | https://raw.githubusercontent.com/Ilyasrf/1337/01ab7a0/fizzbuzz/fizzbuzz.c | Ilyasrf/1337 01ab7a0 fizzbuzz/fizzbuzz.c | true | 200 | 650 | #include<unistd.h>
void ft_putchar(char c)
{
write (1, &c, 1);
}
void ft_putnumber(char nb)
{
if (nb < 10)
ft_putchar( nb + '0');
else
{
ft_putnumber(nb / 10);
ft_putnumber(nb % 10);
}
}
int main()
{
int number;
number = 1;
while (number <= 100)
{
... | 6 |
HaS1k/LabsC | 06c876e | laba2/main.c | C | www.github.com/HaS1k/LabsC/tree/main/laba2/main.c | https://raw.githubusercontent.com/HaS1k/LabsC/06c876e/laba2/main.c | HaS1k/LabsC 06c876e laba2/main.c | true | 200 | 877 | #include <stdio.h>
#include <stdlib.h>
#include <conio.h>
int main()
{
int a[2][2];
int i,j;
int sum1 = 0, sum2 = 0;
for (i=0; i<3; i++)
{
for(j=0; j<3; j++)
{
printf("vvedite element matritsi [%d][%d]", i, j);
scanf("%d", &a[i][j]);
... | 4 |
Septien/http-client | 98f2bcb | src/http-client.c | C | www.github.com/Septien/http-client/tree/main/src/http-client.c | https://raw.githubusercontent.com/Septien/http-client/98f2bcb/src/http-client.c | Septien/http-client 98f2bcb src/http-client.c | true | 200 | 6,810 | #include <string.h>
#include <assert.h>
#include <ctype.h>
#include <stdio.h>
#include "http-client.h"
unsigned long hash(unsigned char *str) {
unsigned long hash = 5381;
int c;
while ((c = *str++))
hash = c + (hash << 6) + (hash << 16) - hash;
return hash % HEADERS;
}
/*-------------------... | 1 |
SergeyKrivoshchapov/Practice4 | 2f1ae12 | before9step/main.c | C | www.github.com/SergeyKrivoshchapov/Practice4/tree/main/before9step/main.c | https://raw.githubusercontent.com/SergeyKrivoshchapov/Practice4/2f1ae12/before9step/main.c | SergeyKrivoshchapov/Practice4 2f1ae12 before9step/main.c | true | 200 | 2,562 | #include "WIFI.h"
#include "my_queue.h"
int main()
{
// Инициализация трёх экземпляров структуры на стеке
printf("Creating first struct.\n");
WIFI router1;
if (struct_init_result(init_struct(&router1, "TPLINK", 2, Is5G)) != 0) return 1;
printf("First: \n");
print_struct(&router1); // Вывод сведений о структуре
... | 2 |
MinTTT/Scripts_for_colony_pattern_development | a60bd2f | An_agent-based_model_for_colony_establishment/SSA_Colony/colony_agent_based_SSA/SSAToggle.h | C | www.github.com/MinTTT/Scripts_for_colony_pattern_development/tree/main/An_agent-based_model_for_colony_establishment/SSA_Colony/colony_agent_based_SSA/SSAToggle.h | https://raw.githubusercontent.com/MinTTT/Scripts_for_colony_pattern_development/a60bd2f/An_agent-based_model_for_colony_establishment/SSA_Colony/colony_agent_based_SSA/SSAToggle.h | MinTTT/Scripts_for_colony_pattern_development a60bd2f An_agent-based_model_for_colony_establishment/SSA_Colony/colony_agent_based_SSA/SSAToggle.h | true | 200 | 3,257 | #ifndef SSATOGGLE_H_
#define SSATOGGLE_H_
#include "Cells.h"
struct ToggleCell{
int lineage;
int parent;
int rcdSize;
double* time;
int* green;
int* red;
// Initializes the toggle state of a cell, and cell states are blank.
ToggleCell(){
this->lineage = -1;
this->parent... | 3 |
pannawittt/CPE100 | 62d2cb0 | project/blackjack.c | C | www.github.com/pannawittt/CPE100/tree/main/project/blackjack.c | https://raw.githubusercontent.com/pannawittt/CPE100/62d2cb0/project/blackjack.c | pannawittt/CPE100 62d2cb0 project/blackjack.c | true | 200 | 15,408 | #include <stdio.h>
#include <string.h>
unsigned int global_seed = 1022; //seed เริ่มต้น
int goal = 21; //goal to win
//struct สำหรับใช้ในฟังก์ชั่น update เพื่อเก็บข้อมูลผู้เล่น(ชื่อ , คะแนนฝั่งเรา, คะแนนฝั่งตรงข้าม)
typedef struct{
char name[100];
int my_score;
int com_score;
} player;
//bool type variab... | 0 |
MJneedshelp/42-Singapore-Cursus-Pipex | 49678d8 | src/libft/ft_putptr.c | C | www.github.com/MJneedshelp/42-Singapore-Cursus-Pipex/tree/main/src/libft/ft_putptr.c | https://raw.githubusercontent.com/MJneedshelp/42-Singapore-Cursus-Pipex/49678d8/src/libft/ft_putptr.c | MJneedshelp/42-Singapore-Cursus-Pipex 49678d8 src/libft/ft_putptr.c | true | 200 | 1,796 | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putptr.c :+: :+: :+... | 4 |
Codexity-APR/Codexity | 037c97c | Data/Iteration/Fixed/39/39_CWE_401_Null-Dereference:4_Nullptr-Dereference:4_Memory-Leak_._time_123.46/round3/gen0/0.c | C | www.github.com/Codexity-APR/Codexity/tree/main/Data/Iteration/Fixed/39/39_CWE_401_Null-Dereference:4_Nullptr-Dereference:4_Memory-Leak_._time_123.46/round3/gen0/0.c | https://raw.githubusercontent.com/Codexity-APR/Codexity/037c97c/Data/Iteration/Fixed/39/39_CWE_401_Null-Dereference%3A4_Nullptr-Dereference%3A4_Memory-Leak_._time_123.46/round3/gen0/0.c | Codexity-APR/Codexity 037c97c Data/Iteration/Fixed/39/39_CWE_401_Null-Dereference:4_Nullptr-Dereference:4_Memory-Leak_._time_123.46/round3/gen0/0.c | true | 200 | 1,642 | #include <stdio.h>
#include <stdlib.h>
typedef struct linkedList
{
int first;
struct linkedList* rest;
} linkedList;
linkedList* makeList(int a, int b, int c);
void addToList(linkedList* ll, int a);
void freeList(linkedList* ll);
int main()
{
linkedList* ll = makeList(1, 3, 5);
addToList(ll, 7);
... | 6 |
kiikode/alx-low_level_programming | 403e12a | 0x02-functions_nested_loops/3-islower.c | C | www.github.com/kiikode/alx-low_level_programming/tree/main/0x02-functions_nested_loops/3-islower.c | https://raw.githubusercontent.com/kiikode/alx-low_level_programming/403e12a/0x02-functions_nested_loops/3-islower.c | kiikode/alx-low_level_programming 403e12a 0x02-functions_nested_loops/3-islower.c | true | 200 | 257 | #include "main.h"
/**
* _islower - Check for lowercase
*
* @c: ASCII code for the character
*
* Return: 1 for lowercase, 0 for others
*/
int _islower(int c)
{
if (c >= 97 && c <= 122)
{
return (1);
}
else
{
return (0);
}
_putchar('\n');
}
| 5 |
Priyanshu-Mallick/C-Programming | a005422 | Assigment Work 3/q16.c | C | www.github.com/Priyanshu-Mallick/C-Programming/tree/main/Assigment Work 3/q16.c | https://raw.githubusercontent.com/Priyanshu-Mallick/C-Programming/a005422/Assigment%20Work%203/q16.c | Priyanshu-Mallick/C-Programming a005422 Assigment Work 3/q16.c | true | 200 | 693 |
//Name- Priyanshu Mallick, Roll No- 13
/**
Q16. Write a program that will read x and compute sin(x)
(Hints: Use Taylor�s series expansion sin(x)= x- x3/3! + x5/5! � x7/ 7! + ��� )
**/
#include<stdio.h>
#include<math.h>
int main()
{
float x,rad,n,t=1,sum=0;
int i,j,f,c;
printf("\nEnter the degree value : "... | 1 |
DanielSouza7/Algoritmo_C | 5c23c5a | Atividade_13/atividade_13.c | C | www.github.com/DanielSouza7/Algoritmo_C/tree/main/Atividade_13/atividade_13.c | https://raw.githubusercontent.com/DanielSouza7/Algoritmo_C/5c23c5a/Atividade_13/atividade_13.c | DanielSouza7/Algoritmo_C 5c23c5a Atividade_13/atividade_13.c | true | 200 | 13,482 | /* ATIVIDADE 13 - STRUCT - DANIEL SOUZA UC23100767
Implemente um algoritmo que:
Inclua até 1000 usuários;
Edite um usuário;
Exclua um usuário;
Busque um usuário pelo e-mail;
Imprima todos os usuários cadastrados;
Obrigatório uso de struct, vetor e função.
Obrigatório uso d... | 2 |
MOHAMED200177/alx-low_level_programming | e2bcb72 | 0x07-pointers_arrays_strings/7-print_chessboard.c | C | www.github.com/MOHAMED200177/alx-low_level_programming/tree/main/0x07-pointers_arrays_strings/7-print_chessboard.c | https://raw.githubusercontent.com/MOHAMED200177/alx-low_level_programming/e2bcb72/0x07-pointers_arrays_strings/7-print_chessboard.c | MOHAMED200177/alx-low_level_programming e2bcb72 0x07-pointers_arrays_strings/7-print_chessboard.c | true | 200 | 288 | #include "main.h"
#include <stdio.h>
/**
* print_chessboard - Write a function that prints the chessboard.
*@a: input
* Return: Always 0.
*/
void print_chessboard(char (*a)[8])
{
int i, l;
for (i = 0; i < 8; i++)
{
for (l = 0; l < 8; l++)
{
_putchar(a[i][l]);
}
_putchar('\n');
}
}
| 0 |
carloalbertogiordano/PSD | c8565a0 | array/search/main.c | C | www.github.com/carloalbertogiordano/PSD/tree/main/array/search/main.c | https://raw.githubusercontent.com/carloalbertogiordano/PSD/c8565a0/array/search/main.c | carloalbertogiordano/PSD c8565a0 array/search/main.c | true | 200 | 209 | #include <stdio.h>
#include "../array.h"
#include "../utils.h"
int main(){
int arr[10] = {1, 4, 2, 9, 23, 7, 5, 8, 4, 6};
int val = linearSearch(23, arr, 10);
printf("%d, %d",val, arr[val]);
}
| 3 |
darthumbris/Cluster | 508de52 | team_tanzanite/include/initialize.h | C | www.github.com/darthumbris/Cluster/tree/main/team_tanzanite/include/initialize.h | https://raw.githubusercontent.com/darthumbris/Cluster/508de52/team_tanzanite/include/initialize.h | darthumbris/Cluster 508de52 team_tanzanite/include/initialize.h | true | 200 | 1,393 | /* ************************************************************************** */
/* */
/* :::::::: */
/* initialize.h :+: :+: ... | 4 |
DamianMartinDominguez/practica-info2 | 6107215 | parcial_version_mia.c | C | www.github.com/DamianMartinDominguez/practica-info2/tree/main/parcial_version_mia.c | https://raw.githubusercontent.com/DamianMartinDominguez/practica-info2/6107215/parcial_version_mia.c | DamianMartinDominguez/practica-info2 6107215 parcial_version_mia.c | true | 200 | 1,704 | /* existe un archivo binario "paciente.dat" secuencial con la siguiente estructura:
int id;
char n[30];
unsigned int tipo;
que prentan los datos de un paciente que se efectuara un analisis donde la variable tipo
es un numero binario que en su bit numero 3 indica con 1 significa analisis de orina,
y el bit 4 en 1 sig... | 5 |
AbelEwnetu/binary_trees | 89f692d | 10-binary_tree_depth.c | C | www.github.com/AbelEwnetu/binary_trees/tree/main/10-binary_tree_depth.c | https://raw.githubusercontent.com/AbelEwnetu/binary_trees/89f692d/10-binary_tree_depth.c | AbelEwnetu/binary_trees 89f692d 10-binary_tree_depth.c | true | 200 | 378 | #include "binary_trees.h"
/**
* binary_tree_depth - Measures the depth of a node in a binary tree
*
* @tree: A pointer to the node to measure the depth
*
* Return: If tree is NULL, your function must return 0,
* else return the depth
*/
size_t binary_tree_depth(const binary_tree_t *tree)
{
return ((tree && tr... | 6 |
ParallelParking/DSMidsem | 9eaa1ec | midsem/queues/descpriorityqueue.h | C | www.github.com/ParallelParking/DSMidsem/tree/main/midsem/queues/descpriorityqueue.h | https://raw.githubusercontent.com/ParallelParking/DSMidsem/9eaa1ec/midsem/queues/descpriorityqueue.h | ParallelParking/DSMidsem 9eaa1ec midsem/queues/descpriorityqueue.h | true | 200 | 1,001 | #include <stdio.h>
#include <stdlib.h>
#define MAX 1000
typedef struct {
int items[MAX];
int front;
int rear;
} PQUEUE;
PQUEUE createQueue() {
PQUEUE queue;
queue.front = -1;
queue.rear = -1;
return queue;
}
int isFull(PQUEUE queue) {
return queue.rear == MAX - 1;
}... | 1 |
amitraj99053/C-Code | f4b671e | cosX.c | C | www.github.com/amitraj99053/C-Code/tree/main/cosX.c | https://raw.githubusercontent.com/amitraj99053/C-Code/f4b671e/cosX.c | amitraj99053/C-Code f4b671e cosX.c | true | 200 | 482 | // function cos x = x^0/0! - x^2/2! + x^4/4! - x^6/6!....
#include <stdio.h>
int myPow(int x, int y)
{
float p=1;
while(y)
{
p*=x;
y--;
}
return p;
}
int fact(int x)
{
int p=1;
while(x)
{
p*=x;
x--;
}
return p;
}
void main()
{
int i,z=1;
float res = 0,x;
printf("E... | 7 |
LeeGaYeun/Intel | bfb14ee | 라즈베리파이/LCD/ultralcd.c | C | www.github.com/LeeGaYeun/Intel/tree/main/라즈베리파이/LCD/ultralcd.c | https://raw.githubusercontent.com/LeeGaYeun/Intel/bfb14ee/%EB%9D%BC%EC%A6%88%EB%B2%A0%EB%A6%AC%ED%8C%8C%EC%9D%B4/LCD/ultralcd.c | LeeGaYeun/Intel bfb14ee 라즈베리파이/LCD/ultralcd.c | true | 200 | 1,103 | #include <stdio.h>
#include <wiringPi.h>
#include <wiringPiI2C.h>
#include "lcd1602.h"
const int pinEcho = 1;
const int pinTrigger = 0;
int xio;
int main()
{
printf("초음파 거리 측정 시작\n");
wiringPiSetupGpio();
xio = wiringPiI2CSetup(I2C_ADDR);
lcd_init();
pinMode(pinEcho, INPUT);
pinMode(pinTrigge... | 2 |
hosu-kim/my_printf | 4360320 | src/ft_hex_printer.c | C | www.github.com/hosu-kim/my_printf/tree/main/src/ft_hex_printer.c | https://raw.githubusercontent.com/hosu-kim/my_printf/4360320/src/ft_hex_printer.c | hosu-kim/my_printf 4360320 src/ft_hex_printer.c | true | 200 | 721 | #include "ft_printf.h"
int ft_hex_printer(unsigned long long hex, char c)
{
int output_len;
char *hex_digits;
hex_digits = "0123456789abcdef";
if (c == 'X')
hex_digits = "0123456789ABCDEF";
output_len = 0;
if (hex >= 16)
output_len += ft_hex_printer(hex / 16, c);
output_len += ft_putchar_fd(hex_digits[hex... | 0 |
pavanmanishd/DSC | e5a4d4e | bubble_sort_DSC.c | C | www.github.com/pavanmanishd/DSC/tree/main/bubble_sort_DSC.c | https://raw.githubusercontent.com/pavanmanishd/DSC/e5a4d4e/bubble_sort_DSC.c | pavanmanishd/DSC e5a4d4e bubble_sort_DSC.c | true | 200 | 1,055 | #include<stdio.h>
#include<stdlib.h>
#include<stdbool.h>
void readList(int[],int);
void printList(int[],int);
void bubbleSort(int[],int);
int main(void)
{
int list[100];
//input
readList(list,8);
printf("List Before swapping :\n");
printList(list,8);
//process
bubbleSort(list,8);
//output
print... | 3 |
PeterAddae/alx-low_level_programming | 6de3b5f | 0x13-more_singly_linked_lists/10-delete_nodeint.c | C | www.github.com/PeterAddae/alx-low_level_programming/tree/main/0x13-more_singly_linked_lists/10-delete_nodeint.c | https://raw.githubusercontent.com/PeterAddae/alx-low_level_programming/6de3b5f/0x13-more_singly_linked_lists/10-delete_nodeint.c | PeterAddae/alx-low_level_programming 6de3b5f 0x13-more_singly_linked_lists/10-delete_nodeint.c | true | 200 | 934 | #include "lists.h"
/**
* delete_nodeint_at_index - deletes the node at index of a listint_t list.
* @head: pointer to the list.
* @index: position of the node to delete.
* Return: 1 if it succeeded, -1 if it failed.
**/
int delete_nodeint_at_index(listint_t **head, unsigned int index)
{
listint_t *aux_n... | 4 |
Filtuga/42_Piscine_C_Projects | 2d92deb | C00/ex04/ft_print_comb.c | C | www.github.com/Filtuga/42_Piscine_C_Projects/tree/main/C00/ex04/ft_print_comb.c | https://raw.githubusercontent.com/Filtuga/42_Piscine_C_Projects/2d92deb/C00/ex04/ft_print_comb.c | Filtuga/42_Piscine_C_Projects 2d92deb C00/ex04/ft_print_comb.c | true | 200 | 355 | #include <unistd.h>
void ft_print_comb(void)
{
char a;
char b;
char c;
a = '0';
while (a < '8')
{
b = a + 1;
while (b < '9')
{
c = b + 1;
while(c <= '9')
{
write(1, &a, 1);
write(1, &b, 1);
write(1, &c, 1);
if (a != '7')
write(1, ", ", 2);
c++;
}
b++;
}
a++;
}
}... | 5 |
VishvaTrivedi/vishva | 008cd92 | q51.c | C | www.github.com/VishvaTrivedi/vishva/tree/main/q51.c | https://raw.githubusercontent.com/VishvaTrivedi/vishva/008cd92/q51.c | VishvaTrivedi/vishva 008cd92 q51.c | true | 200 | 246 | #include<stdio.h>
int main(){
int i, j;
for(i=0;i<5;i++){
for(j=0;j<5;j++){
if(j==i)
printf("1");
else
printf("0");
}
printf("\n");
}
return 0;
} | 7 |
alstdying/lista_aed-UFCA | 0930b32 | questão_2/main.c | C | www.github.com/alstdying/lista_aed-UFCA/tree/main/questão_2/main.c | https://raw.githubusercontent.com/alstdying/lista_aed-UFCA/0930b32/quest%C3%A3o_2/main.c | alstdying/lista_aed-UFCA 0930b32 questão_2/main.c | true | 200 | 1,468 |
#include <stdio.h>
#include <stdlib.h>
#include "pilha.h"
void imprimeMenu(){
printf("Digite o numero da opcao desejada:\n");
printf("1- Inserir aluno\n");
printf("2- Remover aluno\n");
printf("3- Acessa aluno no topo da pilha\n");
printf("4- Imprime a pilha\n");
printf("5- Sair d... | 6 |
yreclab/yreclab | c240ad8 | checkj.c | C | www.github.com/yreclab/yreclab/tree/main/checkj.c | https://raw.githubusercontent.com/yreclab/yreclab/c240ad8/checkj.c | yreclab/yreclab c240ad8 checkj.c | true | 200 | 21,148 | /* checkj.f -- translated by f2c (version 20100827).
You must link the resulting object file with libf2c:
on Microsoft Windows system, link with libf2c.lib;
on Linux or Unix systems, link with .../path/to/libf2c.a -lm
or, if you install libf2c.a in a standard place, with -lf2c -lm
-- in that order, at the end of... | 1 |
Internal-Bleeding/Asteroids_game_SDL | dcd4bbf | source/UI.c | C | www.github.com/Internal-Bleeding/Asteroids_game_SDL/tree/main/source/UI.c | https://raw.githubusercontent.com/Internal-Bleeding/Asteroids_game_SDL/dcd4bbf/source/UI.c | Internal-Bleeding/Asteroids_game_SDL dcd4bbf source/UI.c | true | 200 | 1,805 | #include "UI.h"
void RenderHealth(SDL_Renderer *renderer, int lives)
{
v2 angle = {0, 1};
for (int n = 0; n < lives; n++)
{
v2 pos = {SCREEN_WIDTH * 0.03 + (n * 50), SCREEN_HEIGHT * 0.95f};
SDL_Point points[5];
points[0] = FromV2(Sum(pos, MultiplyFloat(angle, 15)));
... | 2 |
kaleidoskopp/cpama | 3ea3ec0 | chapter12/e07.c | C | www.github.com/kaleidoskopp/cpama/tree/main/chapter12/e07.c | https://raw.githubusercontent.com/kaleidoskopp/cpama/3ea3ec0/chapter12/e07.c | kaleidoskopp/cpama 3ea3ec0 chapter12/e07.c | true | 200 | 461 | #include <stdio.h>
#include <stdbool.h>
#define NUM 10
bool search(const int a[], int n, int key);
int main()
{
int arr[NUM] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
int *p_a = arr;
int key = 8;
bool found = search(arr, NUM, key);
printf("Found: %s", found?"true":"false");
}
bool search(const int a... | 3 |
Joanfa7/holbertonschool-low_level_programming | 60eba03 | 0x00-hello_world/101-quote.c | C | www.github.com/Joanfa7/holbertonschool-low_level_programming/tree/main/0x00-hello_world/101-quote.c | https://raw.githubusercontent.com/Joanfa7/holbertonschool-low_level_programming/60eba03/0x00-hello_world/101-quote.c | Joanfa7/holbertonschool-low_level_programming 60eba03 0x00-hello_world/101-quote.c | true | 200 | 200 | #include <unistd.h>
/**
* main- System that prints a stirng
* Return: Anything
*/
int main(void)
{
write(2, "and that piece of art is useful\" - Dora Korpar, 2015-10-19\n", 59);
return (1);
}
| 0 |
Maxsheng/b91_btble_controller_sdk | f51adae | vendor/_proj_btble_controller_/main.c | C | www.github.com/Maxsheng/b91_btble_controller_sdk/tree/main/vendor/_proj_btble_controller_/main.c | https://raw.githubusercontent.com/Maxsheng/b91_btble_controller_sdk/f51adae/vendor/_proj_btble_controller_/main.c | Maxsheng/b91_btble_controller_sdk f51adae vendor/_proj_btble_controller_/main.c | true | 200 | 2,524 | /********************************************************************************************************
* @file main.c
*
* @brief This is the source file for BTBLE SDK
*
* @author BTBLE GROUP
* @date 2,2022
*
* @par Copyright (c) 2021, Telink Semiconductor (Shanghai) Co., Ltd. ("TELINK")
... | 4 |
itscliffordonyango/Assignments2 | cc9d5f1 | bank.c | C | www.github.com/itscliffordonyango/Assignments2/tree/main/bank.c | https://raw.githubusercontent.com/itscliffordonyango/Assignments2/cc9d5f1/bank.c | itscliffordonyango/Assignments2 cc9d5f1 bank.c | true | 200 | 525 | // bank loaning system
#include <stdio.h>
int main(){
// we declare the required varriables
int age , Income ;
printf("Enter your age and your monthly income to verify your eligibility \n");
printf("Age : ");
scanf("%d", age);
printf("Monthly income : ");
scanf("%d", Income);
if... | 1 |
sandra113/alx-low_level_programming | 08311c4 | 0x0B-malloc_free/1-strdup.c | C | www.github.com/sandra113/alx-low_level_programming/tree/main/0x0B-malloc_free/1-strdup.c | https://raw.githubusercontent.com/sandra113/alx-low_level_programming/08311c4/0x0B-malloc_free/1-strdup.c | sandra113/alx-low_level_programming 08311c4 0x0B-malloc_free/1-strdup.c | true | 200 | 439 | #include "main.h"
#include <stdio.h>
#include <stdlib.h>
/**
*_strdup - return a pointer to a newly allocated space in memory
*
* @str: char
* Return: 0 success
*/
char *_strdup(char *str)
{
char *s;
int i, j;
if (str == NULL)
return (NULL);
i = 0;
while (str[i] != '\0')
{
i++;
}
s = malloc(sizeof(ch... | 6 |
zarfld/LinuxCnc_PokeysLibComp | 8ebfe77 | external/Linuxcnc/hal/classicladder/protocol_modbus_master.c | C | www.github.com/zarfld/LinuxCnc_PokeysLibComp/tree/main/external/Linuxcnc/hal/classicladder/protocol_modbus_master.c | https://raw.githubusercontent.com/zarfld/LinuxCnc_PokeysLibComp/8ebfe77/external/Linuxcnc/hal/classicladder/protocol_modbus_master.c | zarfld/LinuxCnc_PokeysLibComp 8ebfe77 external/Linuxcnc/hal/classicladder/protocol_modbus_master.c | true | 200 | 30,231 | /* Classic Ladder Project */
/* Copyright (C) 2001-2010 Marc Le Douarain */
/* http://www.multimania.com/mavati/classicladder */
/* http://www.sourceforge.net/projects/classicladder */
/* August 2005 */
/* ---------------------------------------- */
/* Modbus master protocol (Distributed I/O) */
/* ====================... | 7 |
aqvq/ebike-positioning-system | 8c2820d | firmware/libraries/STM32G0B0RETx/Src/usart.c | C | www.github.com/aqvq/ebike-positioning-system/tree/main/firmware/libraries/STM32G0B0RETx/Src/usart.c | https://raw.githubusercontent.com/aqvq/ebike-positioning-system/8c2820d/firmware/libraries/STM32G0B0RETx/Src/usart.c | aqvq/ebike-positioning-system 8c2820d firmware/libraries/STM32G0B0RETx/Src/usart.c | true | 200 | 10,245 | /* USER CODE BEGIN Header */
/**
******************************************************************************
* @file usart.c
* @brief This file provides code for the configuration
* of the USART instances.
******************************************************************************
* @attention... | 2 |
loeiten/IN2140 | 2ae0ef9 | programming_assignments/set_1/s1_assignment_4.c | C | www.github.com/loeiten/IN2140/tree/main/programming_assignments/set_1/s1_assignment_4.c | https://raw.githubusercontent.com/loeiten/IN2140/2ae0ef9/programming_assignments/set_1/s1_assignment_4.c | loeiten/IN2140 2ae0ef9 programming_assignments/set_1/s1_assignment_4.c | true | 200 | 1,749 | /*
* Assignment:
*
* Write a macro
*
* #define STREQ(s1,s2)
*
* which checks whether the two strings are equal.
* The purpose is to use this in if-tests like
*
* if(STREQ(s, "Abc"))
*/
#include <libgen.h> // for basename
#include <stdio.h> // for printf
#include <stdlib.h> // for EXIT_FAILURE, E... | 3 |
Korotoum-Coulibaly/simple_shell | d3a6a8c | str_token.c | C | www.github.com/Korotoum-Coulibaly/simple_shell/tree/main/str_token.c | https://raw.githubusercontent.com/Korotoum-Coulibaly/simple_shell/d3a6a8c/str_token.c | Korotoum-Coulibaly/simple_shell d3a6a8c str_token.c | true | 200 | 745 | #include "shell.h"
/**
* _strtok - separates strings with delimiters
* @line: It´s pointer to array we receive in getline.
* @delim: It´s characters we mark off string in parts.
* Return: A pointer to the created token
*/
char *_strtok(char *line, char *delim)
{
int j;
static char *str;
char *copystr;
i... | 0 |
blaqsimi42/alx-low_level_programming | 8ed1f5d | 0x0A-argc_argv/1-args.c | C | www.github.com/blaqsimi42/alx-low_level_programming/tree/main/0x0A-argc_argv/1-args.c | https://raw.githubusercontent.com/blaqsimi42/alx-low_level_programming/8ed1f5d/0x0A-argc_argv/1-args.c | blaqsimi42/alx-low_level_programming 8ed1f5d 0x0A-argc_argv/1-args.c | true | 200 | 347 | #include <stdio.h>
/**
* main - prints the number of command line arguements passed
* @argc: the number of command line arguments
* @argv: An array that contains the program command line arguments
*
* Return: Always success.
*/
int main(int argc, char *argv[] __attribute__((unused)))
{
if (argc > 0)
printf("%d\n",... | 4 |
Tinshea/simple-simulation-of-an-ecosystem | cacbadb | main_tests.c | C | www.github.com/Tinshea/simple-simulation-of-an-ecosystem/tree/main/main_tests.c | https://raw.githubusercontent.com/Tinshea/simple-simulation-of-an-ecosystem/cacbadb/main_tests.c | Tinshea/simple-simulation-of-an-ecosystem cacbadb main_tests.c | true | 200 | 1,362 | #include <assert.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <unistd.h>
#include "ecosys.h"
#define NB_PROIES 20
#define NB_PREDATEURS 20
#define ENERGIE 100
/* on crée les listes pour les prédateurs et pour les proies*/
void creerleslistes(Animal **liste_animal , int nb... | 1 |
Punnyasnair/OS | e33e9fc | LAB 4/srtff.c | C | www.github.com/Punnyasnair/OS/tree/main/LAB 4/srtff.c | https://raw.githubusercontent.com/Punnyasnair/OS/e33e9fc/LAB%204/srtff.c | Punnyasnair/OS e33e9fc LAB 4/srtff.c | true | 200 | 1,584 | #include <stdio.h>
int main() {
int n, at[10], bt[10], ct[10], wt[10], temp[10], tat[10], p[10];
int smallest, count = 0, time, end = 0;
double avg_wt = 0, avg_tt = 0;
printf("Enter the number of processes: ");
scanf("%d", &n);
printf("Enter the Arrival Time (AT) and Burst Time (BT) for each ... | 6 |
John-12-27/ysyx22041752 | 7bc5413 | nanos-lite/src/irq.c | C | www.github.com/John-12-27/ysyx22041752/tree/main/nanos-lite/src/irq.c | https://raw.githubusercontent.com/John-12-27/ysyx22041752/7bc5413/nanos-lite/src/irq.c | John-12-27/ysyx22041752 7bc5413 nanos-lite/src/irq.c | true | 200 | 473 | #include <common.h>
extern void do_syscall(Context *c);
static Context* do_event(Event e, Context* c)
{
switch (e.event)
{
case EVENT_YIELD : printf("There is an yield request!\n"); c->mepc += 4; break;
case EVENT_SYSCALL : do_syscall(c); c->mepc += 4; break;
default: panic("Unhand... | 7 |
kpatsakis/primevul6 | c987217 | 122974.c | C | www.github.com/kpatsakis/primevul6/tree/main/122974.c | https://raw.githubusercontent.com/kpatsakis/primevul6/c987217/122974.c | kpatsakis/primevul6 c987217 122974.c | true | 200 | 580 | std::pair<int, int> ComputeDiagLenAndContentOffset(
int diag_index, int max_diag_len, int num_rows, int num_cols,
bool left_align_superdiagonal, bool left_align_subdiagonal) {
const bool left_align = (diag_index >= 0 && left_align_superdiagonal) ||
(diag_index <= 0 && left_align_subd... | 2 |
nelsoncole/sirius-x86-64 | 29f1d72 | kernel/file/sendto.c | C | www.github.com/nelsoncole/sirius-x86-64/tree/main/kernel/file/sendto.c | https://raw.githubusercontent.com/nelsoncole/sirius-x86-64/29f1d72/kernel/file/sendto.c | nelsoncole/sirius-x86-64 29f1d72 kernel/file/sendto.c | true | 200 | 826 | #include <string.h>
#include <socket.h>
#include <inet.h>
#include <stdio.h>
ssize_t sendto(int socket, const void *message, size_t length, int flags,
const struct sockaddr *dest_addr, socklen_t dest_len){
if(!message && length )
return 0;
struct socket *fd = (struct socket *)socket_add... | 3 |
KaianeSousa/listas | e53eb2b | inserir.c | C | www.github.com/KaianeSousa/listas/tree/main/inserir.c | https://raw.githubusercontent.com/KaianeSousa/listas/e53eb2b/inserir.c | KaianeSousa/listas e53eb2b inserir.c | true | 200 | 1,873 |
#include "lista.h"
int tamanhoLista(struct Lista* lista);
void interageInserir(){
struct Lista minhaLista;
inicializarLista(&minhaLista);
int opcao, num, posicao;
do {
printf("\nMenu de Opções:\n");
printf("1. Inserir no Início\n");
printf("2. Inserir no Fim\n");
... | 0 |
MarcosAmericoDev/Laboratorio-de-Programacao | e50e16c | Lista5/02.c | C | www.github.com/MarcosAmericoDev/Laboratorio-de-Programacao/tree/main/Lista5/02.c | https://raw.githubusercontent.com/MarcosAmericoDev/Laboratorio-de-Programacao/e50e16c/Lista5/02.c | MarcosAmericoDev/Laboratorio-de-Programacao e50e16c Lista5/02.c | true | 200 | 1,500 | #include <stdio.h>
#include <stdlib.h>
// Escreva um programa em C que informe o endereço do menor elemento de um vetor de inteiros
// gerado. A quantidade de elementos desse array deve ser fornecido por linha de comando.
#define MAX 99
#define SFT 0
void preenchimentoDeArray(int *, int, int, int);
void mostrarVetor... | 1 |
Sazib-Ahmed/Phitron | 45c1841 | C/Week_2/Module_7.5/a-summation.c | C | www.github.com/Sazib-Ahmed/Phitron/tree/main/C/Week_2/Module_7.5/a-summation.c | https://raw.githubusercontent.com/Sazib-Ahmed/Phitron/45c1841/C/Week_2/Module_7.5/a-summation.c | Sazib-Ahmed/Phitron 45c1841 C/Week_2/Module_7.5/a-summation.c | true | 200 | 455 | #include<stdio.h>
int main(){
int n=0, a;
long long int sum=0;
scanf("%d", &n);
//Taking input array
int arr[n];
for(int i=0; i<n; i++){
scanf("%d", &a);
arr[i]=a;
}
//Calculating sum of the array
for(int i=0; i<n; i++){
sum+= arr[i];
}
//Chan... | 4 |
Brig1tte/alx-low_level_programming | dabd4b0 | 0x0B-malloc_free/2-str_concat.c | C | www.github.com/Brig1tte/alx-low_level_programming/tree/main/0x0B-malloc_free/2-str_concat.c | https://raw.githubusercontent.com/Brig1tte/alx-low_level_programming/dabd4b0/0x0B-malloc_free/2-str_concat.c | Brig1tte/alx-low_level_programming dabd4b0 0x0B-malloc_free/2-str_concat.c | true | 200 | 667 | #include "main.h"
#include <stdlib.h>
/**
* *str_concat - function to concatenate two strings
* @s1: first input string
* @s2: second input string
* Return: concat of the two inputs
*/
char *str_concat(char *s1, char *s2)
{
char *concat;
int j, kj;
if (s1 == NULL)
s1 = "";
if (s2 == NULL)
s2 = "";
j = ... | 5 |
Favouridowu02/alx-low_level_programming | a6e1d29 | 0x02-functions_nested_loops/0-putchar.c | C | www.github.com/Favouridowu02/alx-low_level_programming/tree/main/0x02-functions_nested_loops/0-putchar.c | https://raw.githubusercontent.com/Favouridowu02/alx-low_level_programming/a6e1d29/0x02-functions_nested_loops/0-putchar.c | Favouridowu02/alx-low_level_programming a6e1d29 0x02-functions_nested_loops/0-putchar.c | true | 200 | 319 | #include "main.h"
#include <stdio.h>
/**
* main - Write a program that prints _putchar,
* followed by a new line.
* Return: returns 0
*/
int main(void)
{
_putchar('_');
_putchar('p');
_putchar('u');
_putchar('t');
_putchar('c');
_putchar('h');
_putchar('a');
_putchar('r');
_putchar('\n');
return (0);
}
| 6 |
DarkNomads/DistoY | d196569 | code/hwt905_ttl/src/helpers.c | C | www.github.com/DarkNomads/DistoY/tree/main/code/hwt905_ttl/src/helpers.c | https://raw.githubusercontent.com/DarkNomads/DistoY/d196569/code/hwt905_ttl/src/helpers.c | DarkNomads/DistoY d196569 code/hwt905_ttl/src/helpers.c | true | 200 | 2,129 | #include "helpers.h"
#include <stdio.h>
#include <stdlib.h>
/*
Function: Clears any data from a file.
Inputs: A file name.
Outputs: None.
*/
void clearData( char* filename ) {
FILE* file = fopen( filename, "w" );
fputs( "\0", file );
fclose( file );
}
/*
Function: Writes data to a specifie... | 7 |
STATICHIT/AlgorithmProblemTraining | b0fe09f | 作业/A+B时分秒问题.c | C | www.github.com/STATICHIT/AlgorithmProblemTraining/tree/main/作业/A+B时分秒问题.c | https://raw.githubusercontent.com/STATICHIT/AlgorithmProblemTraining/b0fe09f/%E4%BD%9C%E4%B8%9A/A%2BB%E6%97%B6%E5%88%86%E7%A7%92%E9%97%AE%E9%A2%98.c | STATICHIT/AlgorithmProblemTraining b0fe09f 作业/A+B时分秒问题.c | true | 200 | 309 | #include<stdio.h>
#include<string.h>//��Ϊ���������õ���strlen����������Ҫ����string.hͷ�ļ�
void main()
{
int i;
char a[101];
gets(a);
for(i=strlen(a)-1;i>=0;i--)
putchar(a[i]);//��ΪҪ���������
//������һ��һ���ַ����
//������putchar������puts
}
| 3 |
NeunMonde/luh-prog1 | 5ee1f3c | Assignment10/filesystem.c | C | www.github.com/NeunMonde/luh-prog1/tree/main/Assignment10/filesystem.c | https://raw.githubusercontent.com/NeunMonde/luh-prog1/5ee1f3c/Assignment10/filesystem.c | NeunMonde/luh-prog1 5ee1f3c Assignment10/filesystem.c | true | 200 | 11,443 | #include "base.h"
typedef enum {
NT_DIR,
NT_FILE,
} NodeType;
#define MAX_NAME_LEN 63
typedef struct Node Node;
typedef struct Entry Entry;
// An entry in a directory. A directory is a linked list of entries.
struct Entry {
Node* node;
Entry* next;
};
// A node of the file system. Can either be a d... | 2 |
Jaikz07/alx-low_level_programming | 28c791b | 0x14-bit_manipulation/0-binary_to_uint.c | C | www.github.com/Jaikz07/alx-low_level_programming/tree/main/0x14-bit_manipulation/0-binary_to_uint.c | https://raw.githubusercontent.com/Jaikz07/alx-low_level_programming/28c791b/0x14-bit_manipulation/0-binary_to_uint.c | Jaikz07/alx-low_level_programming 28c791b 0x14-bit_manipulation/0-binary_to_uint.c | true | 200 | 407 | #include "main.h"
/**
* binary_to_uint - converts a binary to an unsigned integer
* @b: pointer to string of binary 0 and 1.
* Return: converted number or 0 if b is NULL.
*/
unsigned int binary_to_uint(const char *b)
{
unsigned int num = 0;
if (b == NULL)
return (0);
while (*b != '\0')
{
if (*b != '0' && *b != '... | 1 |
ulascan54/my-learning-path | c97f7de | c/examples/control-flow/4-grade-students.c | C | www.github.com/ulascan54/my-learning-path/tree/main/c/examples/control-flow/4-grade-students.c | https://raw.githubusercontent.com/ulascan54/my-learning-path/c97f7de/c/examples/control-flow/4-grade-students.c | ulascan54/my-learning-path c97f7de c/examples/control-flow/4-grade-students.c | true | 200 | 388 | #include <stdio.h>
int main()
{
double marks;
// get input value for marks
scanf("%lf", &marks);
// check the value of marks and assign grade based on the value
if (marks > 0 && marks < 70)
printf("D");
else if (marks < 80)
printf("C");
else if (marks < 90)
printf(... | 4 |
FOA1/alx-low_level_programming | 3f6459d | 0x06-pointers_arrays_strings/7-leet.c | C | www.github.com/FOA1/alx-low_level_programming/tree/main/0x06-pointers_arrays_strings/7-leet.c | https://raw.githubusercontent.com/FOA1/alx-low_level_programming/3f6459d/0x06-pointers_arrays_strings/7-leet.c | FOA1/alx-low_level_programming 3f6459d 0x06-pointers_arrays_strings/7-leet.c | true | 200 | 428 | #include "main.h"
/**
* leet - converts 'A', 'E', 'O', 'T', 'L' in a string to
* numbers '4', '3', '0', '7', '1'
*
* @p: the string to convert
*
* Return: the string p.
*/
char *rot13(char *p)
{
int i, j;
char check[] = "ABCDEFGHIJKLM";
char rep[] = "NOPQRSTUVWXYZ"
for (i = 0; i < 13; i++)
{
for (j = 0; ... | 5 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.