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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
srgemb/WaterControl | 20821d6 | FirmWare/Source/modbus.c | C | www.github.com/srgemb/WaterControl/tree/main/FirmWare/Source/modbus.c | https://raw.githubusercontent.com/srgemb/WaterControl/20821d6/FirmWare/Source/modbus.c | srgemb/WaterControl 20821d6 FirmWare/Source/modbus.c | true | 200 | 27,380 |
//*************************************************************************************************
//
// Управление протоколом MODBUS (slave)
//
//*************************************************************************************************
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <cty... | 7 |
BrandonMFong/bulletin | 1147102 | firmware/main/lcdutil.c | C | www.github.com/BrandonMFong/bulletin/tree/main/firmware/main/lcdutil.c | https://raw.githubusercontent.com/BrandonMFong/bulletin/1147102/firmware/main/lcdutil.c | BrandonMFong/bulletin 1147102 firmware/main/lcdutil.c | true | 200 | 4,712 | /**
* author: brando
* date: 11/3/23
*/
#include "lcdutil.h"
#include "bulletin.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "esp_timer.h"
#include "esp_lcd_panel_ops.h"
#include "driver/i2c.h"
#include "esp_err.h"
#include "esp_log.h"
#include "esp_lvgl_port.h"
#include "esp_lcd_panel_vend... | 3 |
Lucasvw89/Solved-Problems | 633f873 | Algo_course/Set4_AVL&Heaps/AVLTree.c | C | www.github.com/Lucasvw89/Solved-Problems/tree/main/Algo_course/Set4_AVL&Heaps/AVLTree.c | https://raw.githubusercontent.com/Lucasvw89/Solved-Problems/633f873/Algo_course/Set4_AVL%26Heaps/AVLTree.c | Lucasvw89/Solved-Problems 633f873 Algo_course/Set4_AVL&Heaps/AVLTree.c | true | 200 | 3,776 | #include <stdlib.h>
#include <stdio.h>
int MAX(int a, int b)
{
return (a > b) ? a : b;
}
struct node{
int key;
struct node* left;
struct node* right;
int height;
int rank;
};
typedef struct node BSTNode;
BSTNode* create_bstnode(int key)
{
BSTNode* n = (BSTNode*)... | 4 |
ogctn/42-push_swap | 4acd354 | bonus_checker/apply_rule.c | C | www.github.com/ogctn/42-push_swap/tree/main/bonus_checker/apply_rule.c | https://raw.githubusercontent.com/ogctn/42-push_swap/4acd354/bonus_checker/apply_rule.c | ogctn/42-push_swap 4acd354 bonus_checker/apply_rule.c | true | 200 | 2,476 | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* apply_rule.c :+: :+: :+: ... | 0 |
Jidepam01/alx-low_level_programming | 96f93ee | 0x15-file_io/0-read_textfile.c | C | www.github.com/Jidepam01/alx-low_level_programming/tree/main/0x15-file_io/0-read_textfile.c | https://raw.githubusercontent.com/Jidepam01/alx-low_level_programming/96f93ee/0x15-file_io/0-read_textfile.c | Jidepam01/alx-low_level_programming 96f93ee 0x15-file_io/0-read_textfile.c | true | 200 | 806 | #include "main.h"
/**
* read_textfile - a function that reads a text file and prints it to STDOUT
* @filename: the name of the file
* @letters: the number of letters it should read and print
*
* Return: returns the actual number of letters it could read and print
* if the file can not be opened or read, return 0
* if ... | 6 |
Pedr9vskCray/UFFrepo | 5869244 | matrizes/MatrizBasica.c | C | www.github.com/Pedr9vskCray/UFFrepo/tree/main/matrizes/MatrizBasica.c | https://raw.githubusercontent.com/Pedr9vskCray/UFFrepo/5869244/matrizes/MatrizBasica.c | Pedr9vskCray/UFFrepo 5869244 matrizes/MatrizBasica.c | true | 200 | 284 | #include <stdio.h>
int main()
{
int i, j;
int A[2][3] = {{1, 2, 3}, {4, 5, 6}}; // declaração matriz = matriz[linhas][colunas]
for (i = 0; i < 2; i++)
{
for (j = 0; j < 3; j++)
{
printf("%d\n", A[i][j]);
}
}
return 0;
} | 7 |
THEKINGSTAR/simple_shell | ae70272 | functions.c | C | www.github.com/THEKINGSTAR/simple_shell/tree/main/functions.c | https://raw.githubusercontent.com/THEKINGSTAR/simple_shell/ae70272/functions.c | THEKINGSTAR/simple_shell ae70272 functions.c | true | 200 | 1,025 | #include "shell.h"
/**
* prompt - check the input form terminal or file
*
* Return: none
*/
void prompt(void)
{
if (isatty(STDIN_FILENO))
{
write(1, "($) ", 4);
}
}
/**
* is_path - is this path
* @args: 1
*
* Return: int
*/
int is_path(char *args)
{
int i;
int fd;
for (i = 0; args[i] != '\0'; i++)
{
... | 3 |
adithyanarisipilli/C-programming | db2c6e0 | programming lab/ASSG7_B220428CS_ADITHYA/ASSG7_B220428CS_ADITHYA_4.c | C | www.github.com/adithyanarisipilli/C-programming/tree/main/programming lab/ASSG7_B220428CS_ADITHYA/ASSG7_B220428CS_ADITHYA_4.c | https://raw.githubusercontent.com/adithyanarisipilli/C-programming/db2c6e0/programming%20lab/ASSG7_B220428CS_ADITHYA/ASSG7_B220428CS_ADITHYA_4.c | adithyanarisipilli/C-programming db2c6e0 programming lab/ASSG7_B220428CS_ADITHYA/ASSG7_B220428CS_ADITHYA_4.c | true | 200 | 4,380 | #include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <limits.h>
struct Node {
char data;
struct Node* left;
struct Node* right;
};
struct Node* createNode(char data) {
struct Node* newNode = (struct Node*)malloc(sizeof(struct Node));
newNode->data = data;
newNode->lef... | 0 |
Shravanikalesh344/Problem-Solving | 844fab3 | Program147.c | C | www.github.com/Shravanikalesh344/Problem-Solving/tree/main/Program147.c | https://raw.githubusercontent.com/Shravanikalesh344/Problem-Solving/844fab3/Program147.c | Shravanikalesh344/Problem-Solving 844fab3 Program147.c | true | 200 | 919 | // Linked List
#include<stdio.h>
#include<stdlib.h>
//Structure Declration
struct node
{
int Data; //4 bytes
struct node *next; //8 bytes
};
typedef struct node NODE;
typedef struct node * PNODE;
typedef struct node ** PPNODE;
void InsertFirst(PPNODE Head , int No)
{
//Step ... | 6 |
TakashiTanaka/c-study | dfb11a3 | intro/string.c | C | www.github.com/TakashiTanaka/c-study/tree/main/intro/string.c | https://raw.githubusercontent.com/TakashiTanaka/c-study/dfb11a3/intro/string.c | TakashiTanaka/c-study dfb11a3 intro/string.c | true | 200 | 239 | # include <stdio.h>
/*
文字列 = charの配列(終端は\0)
string型というのは存在しない
char s[] = {'a', 'b', 'c', '\0'};
char s[] = "abc";
*/
int main(void) {
char s[] = "abc";
printf("%c\n", s[1]);
return 0;
} | 4 |
Shrujal00/Calculator-Using-c | f826d0d | calculator.c | C | www.github.com/Shrujal00/Calculator-Using-c/tree/main/calculator.c | https://raw.githubusercontent.com/Shrujal00/Calculator-Using-c/f826d0d/calculator.c | Shrujal00/Calculator-Using-c f826d0d calculator.c | true | 200 | 732 | #include <stdio.h>
int main()
{
printf("Shrujal's badic Calculator\n");
int n1,n2;
char func;
int res;
printf("Input number 1: ");
scanf("%d",&n1);
printf("\nInput number 2: ");
scanf("%d",&n2);
printf("\nEnter a function to do: +,-,*,/: ");
scanf(" %c",&fun... | 7 |
Ravenports/ravensource | f27cf99 | bucket_36/gstreamer1-plugins-v4l2/patches/patch-sys_v4l2_v4l2__calls.c | C | www.github.com/Ravenports/ravensource/tree/main/bucket_36/gstreamer1-plugins-v4l2/patches/patch-sys_v4l2_v4l2__calls.c | https://raw.githubusercontent.com/Ravenports/ravensource/f27cf99/bucket_36/gstreamer1-plugins-v4l2/patches/patch-sys_v4l2_v4l2__calls.c | Ravenports/ravensource f27cf99 bucket_36/gstreamer1-plugins-v4l2/patches/patch-sys_v4l2_v4l2__calls.c | true | 200 | 511 | --- sys/v4l2/v4l2_calls.c.orig 2024-04-09 20:48:55 UTC
+++ sys/v4l2/v4l2_calls.c
@@ -1333,10 +1333,12 @@ gst_v4l2_query_dv_timings (GstV4l2Object
if (ret < 0) {
switch (errno) {
+#ifdef ENODATA
case ENODATA:
GST_DEBUG_OBJECT (v4l2object->dbg_obj,
"QUERY_DV_TIMINGS not supported fo... | 3 |
mayankbutanii22/2D-array-row-col---C | 2a544e1 | Diagonal 2D array3.c | C | www.github.com/mayankbutanii22/2D-array-row-col---C/tree/main/Diagonal 2D array3.c | https://raw.githubusercontent.com/mayankbutanii22/2D-array-row-col---C/2a544e1/Diagonal%202D%20array3.c | mayankbutanii22/2D-array-row-col---C 2a544e1 Diagonal 2D array3.c | true | 200 | 566 | #include<stdio.h>
main()
{
int x=0,y=0,n;
int sum=0;
int a[3][3]={{2,4,1},{3,5,4},{8,2,6}};
printf("Enter the array's row & column size: ");
scanf("%d",&n);
for(x=0; x<3; x++){
for(y=0; y<3; y++){
scanf("\n%d",&a[x][y]);
}
}
printf("\nEnter array's elements: ");
for(x=0; x<3; ... | 6 |
MinjeaLee/TIL_for_mac | 62fa47f | c_language/Sejong/일반_C/실습문제/8장/4.c | C | www.github.com/MinjeaLee/TIL_for_mac/tree/main/c_language/Sejong/일반_C/실습문제/8장/4.c | https://raw.githubusercontent.com/MinjeaLee/TIL_for_mac/62fa47f/c_language/Sejong/%EC%9D%BC%EB%B0%98_C/%EC%8B%A4%EC%8A%B5%EB%AC%B8%EC%A0%9C/8%EC%9E%A5/4.c | MinjeaLee/TIL_for_mac 62fa47f c_language/Sejong/일반_C/실습문제/8장/4.c | true | 200 | 468 | #include <stdio.h>
void print_row1(int x){
for(int i = 0; i < x; i++){
printf("%d", x);
}
printf("\n");
}
void print_row2(int x){
for(int i = 0; i < x - 2; i++){
printf("%d", x);
for(int j = 0; j < x - 2; j++){
printf(" ");
}
printf("%... | 0 |
Tumixs/alx-low_level_programming | 78cbf9b | 0x12-singly_linked_lists/3-add_node_end.c | C | www.github.com/Tumixs/alx-low_level_programming/tree/main/0x12-singly_linked_lists/3-add_node_end.c | https://raw.githubusercontent.com/Tumixs/alx-low_level_programming/78cbf9b/0x12-singly_linked_lists/3-add_node_end.c | Tumixs/alx-low_level_programming 78cbf9b 0x12-singly_linked_lists/3-add_node_end.c | true | 200 | 716 | /*
* File: 3-add_node_end.c
* Author: Asere Oluwatumise S.
*/
#include "lists.h"
/**
* add_node_end - adds a new node at the end of list_t
* @head: first node
* @str: node element
*
* Return: returns the address of the new element,
* returns NULL if it failed.
*/
list_t *add_node_end(list_t **head, const cha... | 4 |
Kkyn-ltcode/Raw_code | cca1292 | data/batch_9/1857_0.c | C | www.github.com/Kkyn-ltcode/Raw_code/tree/main/data/batch_9/1857_0.c | https://raw.githubusercontent.com/Kkyn-ltcode/Raw_code/cca1292/data/batch_9/1857_0.c | Kkyn-ltcode/Raw_code cca1292 data/batch_9/1857_0.c | true | 200 | 286 | static inline void put_pixels8x8_overlapped ( uint8_t * dst , uint8_t * src , int stride ) {
uint8_t tmp [ 64 ] ;
int i ;
for ( i = 0 ;
i < 8 ;
i ++ ) memcpy ( tmp + i * 8 , src + i * stride , 8 ) ;
for ( i = 0 ;
i < 8 ;
i ++ ) memcpy ( dst + i * stride , tmp + i * 8 , 8 ) ;
} | 7 |
kassem00/alx-low_level_programming | 6bdd5e8 | 0x12-singly_linked_lists/4-free_list.c | C | www.github.com/kassem00/alx-low_level_programming/tree/main/0x12-singly_linked_lists/4-free_list.c | https://raw.githubusercontent.com/kassem00/alx-low_level_programming/6bdd5e8/0x12-singly_linked_lists/4-free_list.c | kassem00/alx-low_level_programming 6bdd5e8 0x12-singly_linked_lists/4-free_list.c | true | 200 | 256 | #include "lists.h"
/**
* free_list - adds a new node .
* @head: pointer to point to pointer.
* Return: void;
*/
void free_list(list_t *head)
{
list_t *temp_list;
while (head)
{
temp_list = head->next;
free(head->str);
free(head);
head = temp_list;
}
}
| 3 |
astrotee/alx-low_level_programming | be69229 | 0x14-bit_manipulation/1-print_binary.c | C | www.github.com/astrotee/alx-low_level_programming/tree/main/0x14-bit_manipulation/1-print_binary.c | https://raw.githubusercontent.com/astrotee/alx-low_level_programming/be69229/0x14-bit_manipulation/1-print_binary.c | astrotee/alx-low_level_programming be69229 0x14-bit_manipulation/1-print_binary.c | true | 200 | 389 | /* vim: set noet:ts=8:sw=8 */
#include "main.h"
/**
* print_binary - print the binary repr
* @n: the number to print
* Return: nothing
*/
void print_binary(unsigned long int n)
{
int count = (sizeof(n) * 8) - 1;
short msb = 0;
short bit = 0;
while (~count)
{
bit = (n & (1UL << count)) ? 1 : 0;
msb |= bit... | 6 |
cheiy/alx-low_level_programming | 41bdf84 | 0x07-pointers_arrays_strings/7-print_chessboard.c | C | www.github.com/cheiy/alx-low_level_programming/tree/main/0x07-pointers_arrays_strings/7-print_chessboard.c | https://raw.githubusercontent.com/cheiy/alx-low_level_programming/41bdf84/0x07-pointers_arrays_strings/7-print_chessboard.c | cheiy/alx-low_level_programming 41bdf84 0x07-pointers_arrays_strings/7-print_chessboard.c | true | 200 | 457 | #include "main.h"
/**
* print_chessboard - Prints the chessboard.
* @a: pointer to array holding chess pieces.
*
* Description: Prints the chessboard.
*
* Return: Nothing.
*/
void print_chessboard(char (*a)[8])
{
int row, col;
row = 0;
col = 0;
while (row < 8)
{
while (col < 8)
{
if (col == 7)
{
... | 7 |
zakheledyosba/alx-low_level_programming | 3d6f120 | 0x0E-structures_typedef/2-print_dog.c | C | www.github.com/zakheledyosba/alx-low_level_programming/tree/main/0x0E-structures_typedef/2-print_dog.c | https://raw.githubusercontent.com/zakheledyosba/alx-low_level_programming/3d6f120/0x0E-structures_typedef/2-print_dog.c | zakheledyosba/alx-low_level_programming 3d6f120 0x0E-structures_typedef/2-print_dog.c | true | 200 | 351 | #include <stdio.h>
#include <stdlib.h>
#include "dog.h"
/**
* print_dog -"prints a struct dog
* @d: struct dog to print"
*/
void print_dog(struct dog *d)
{
if (d == NULL)
return;
if (d->name == NULL)
d->name = "(nil)";
if (d->owner == NULL)
d->owner = "(nil)";
printf("Name: %s\nAge: %f\nOwner: %s\n",... | 3 |
newo-2001/AOC-C | dbb13fc | src/lib/geometry.h | C | www.github.com/newo-2001/AOC-C/tree/main/src/lib/geometry.h | https://raw.githubusercontent.com/newo-2001/AOC-C/dbb13fc/src/lib/geometry.h | newo-2001/AOC-C dbb13fc src/lib/geometry.h | true | 200 | 368 | #ifndef AOC_GEOMETRY_H
#define AOC_GEOMETRY_H
typedef struct Vec2 {
int x;
int y;
} Vec2;
static inline Vec2 vec2_addv(Vec2 left, Vec2 right)
{
return (Vec2) { .x = left.x + right.x, .y = left.y + right.y };
}
typedef enum Direction {
DIR_NORTH,
DIR_EAST,
DIR_SOUTH,
DIR_WEST
} Direction;
... | 4 |
pratibhasingh47/C_programming_learning | ae253ff | loops/for_loop_2.c | C | www.github.com/pratibhasingh47/C_programming_learning/tree/main/loops/for_loop_2.c | https://raw.githubusercontent.com/pratibhasingh47/C_programming_learning/ae253ff/loops/for_loop_2.c | pratibhasingh47/C_programming_learning ae253ff loops/for_loop_2.c | true | 200 | 264 | // WAP to print N natural numbers. For ex if user enters N= 5, then it should print 1 2 3 4 5
#include <stdio.h>
int main()
{
int n, i;
printf("Enter the value\n");
scanf("%d", &n);
for (i = 1; i <= n; i++)
{
printf("%d\n", i);
}
} | 0 |
brKhoo/Terminal-Games | 6fa79dc | 2048.c | C | www.github.com/brKhoo/Terminal-Games/tree/main/2048.c | https://raw.githubusercontent.com/brKhoo/Terminal-Games/6fa79dc/2048.c | brKhoo/Terminal-Games 6fa79dc 2048.c | true | 200 | 6,498 | #include <stdio.h>
#include <stdlib.h>
#include <time.h>
//#include <termios.h>
#include <ctype.h>
#include <unistd.h>
#define SIZE 4
#define RED "\x1B[31m"
#define GRN "\x1B[32m"
#define YEL "\x1B[33m"
#define BLU "\x1B[34m"
#define MAG "\x1B[35m"
#define CYN "\x1B[36m"
#define WHT "\x1B[37m"
#define RESET "\x1B[0m"
i... | 6 |
Rabibarik/Rabi | 55c2ac6 | structure.c | C | www.github.com/Rabibarik/Rabi/tree/main/structure.c | https://raw.githubusercontent.com/Rabibarik/Rabi/55c2ac6/structure.c | Rabibarik/Rabi 55c2ac6 structure.c | true | 200 | 797 | #include<stdio.h>
#include<stdlib.h>
struct student
{
int roll;
char name[20];
char branch[30];
};
void getdata(struct student *ptr,int n)
{
int i;
for(i=0;i<n;i++)
{
printf("enter roll: ");
scanf("%d",&(ptr+i)->roll);
printf("enter name: ");
scanf("%s",(ptr+i)->n... | 7 |
Tonnilson/BNS-ExtendedOptions | 6c55a63 | Dependencies/processhacker/ProcessHacker/affinity.c | C | www.github.com/Tonnilson/BNS-ExtendedOptions/tree/main/Dependencies/processhacker/ProcessHacker/affinity.c | https://raw.githubusercontent.com/Tonnilson/BNS-ExtendedOptions/6c55a63/Dependencies/processhacker/ProcessHacker/affinity.c | Tonnilson/BNS-ExtendedOptions 6c55a63 Dependencies/processhacker/ProcessHacker/affinity.c | true | 200 | 15,480 | /*
* Process Hacker -
* process affinity editor
*
* Copyright (C) 2010-2015 wj32
* Copyright (C) 2020 dmex
*
* This file is part of Process Hacker.
*
* Process Hacker is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free So... | 3 |
Khushi-M-0521/C_Programmes | a31b1d3 | advanced/bill.c | C | www.github.com/Khushi-M-0521/C_Programmes/tree/main/advanced/bill.c | https://raw.githubusercontent.com/Khushi-M-0521/C_Programmes/a31b1d3/advanced/bill.c | Khushi-M-0521/C_Programmes a31b1d3 advanced/bill.c | true | 200 | 1,905 | #include<stdio.h>
char taxino[30],name[30];
float d,amt=0,tax;
int veh,rate;
void input()
{
printf("Enter the Taxi No.: _");
gets(taxino);
printf("Enter the passenger\'s name: _");
gets(name);
printf("Enter vehicle: \n1. Car(4 seater) \n2. Car(6 seater) \n3. Auto \n4. B... | 0 |
Ils96/alx-low_level_programming | 298dc4c | 0x01-variables_if_else_while/7-print_tebahpla.c | C | www.github.com/Ils96/alx-low_level_programming/tree/main/0x01-variables_if_else_while/7-print_tebahpla.c | https://raw.githubusercontent.com/Ils96/alx-low_level_programming/298dc4c/0x01-variables_if_else_while/7-print_tebahpla.c | Ils96/alx-low_level_programming 298dc4c 0x01-variables_if_else_while/7-print_tebahpla.c | true | 200 | 243 | #include <stdio.h>
/**
*main - Entry point
*
*Description: this program print alphabet in reverse
*
*Return: always 0 (success)
*/
int main(void)
{
int i;
for (i = 'z'; i >= 'a'; i--)
{
putchar(i);
}
putchar('\n');
return (0);
}
| 4 |
nxp-mcuxpresso/mcux-devices-lpc | 4671b7f | LPC800/LPC865/drivers/fsl_clock.h | C | www.github.com/nxp-mcuxpresso/mcux-devices-lpc/tree/main/LPC800/LPC865/drivers/fsl_clock.h | https://raw.githubusercontent.com/nxp-mcuxpresso/mcux-devices-lpc/4671b7f/LPC800/LPC865/drivers/fsl_clock.h | nxp-mcuxpresso/mcux-devices-lpc 4671b7f LPC800/LPC865/drivers/fsl_clock.h | true | 200 | 25,494 | /*
* Copyright 2017-2021 NXP
* All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef _FSL_CLOCK_H_
#define _FSL_CLOCK_H_
#include "fsl_common.h"
/*! @addtogroup clock */
/*! @{ */
/*! @file */
/*******************************************************************************
* Definitions
... | 6 |
siphokazi00/alx-higher_level_programming | ba92621 | 0x03-python-data_structures/13-is_palindrome.c | C | www.github.com/siphokazi00/alx-higher_level_programming/tree/main/0x03-python-data_structures/13-is_palindrome.c | https://raw.githubusercontent.com/siphokazi00/alx-higher_level_programming/ba92621/0x03-python-data_structures/13-is_palindrome.c | siphokazi00/alx-higher_level_programming ba92621 0x03-python-data_structures/13-is_palindrome.c | true | 200 | 1,235 | #include <stdio.h>
#include <stdlib.h>
#include "lists.h"
/**
* reverse_list - Reverses a linked list
* @head: Pointer to the head of the list
* Return: Pointer to the new head of the reversed list
*/
listint_t *reverse_list(listint_t *head)
{
listint_t *prev = NULL, *current = head, *next;
while (current != NU... | 7 |
rahul557-shah/DSA | dc0552b | Question18.c | C | www.github.com/rahul557-shah/DSA/tree/main/Question18.c | https://raw.githubusercontent.com/rahul557-shah/DSA/dc0552b/Question18.c | rahul557-shah/DSA dc0552b Question18.c | true | 200 | 1,112 | //Find the dulicates in an array
#include <stdio.h>
#include <stdlib.h>
struct Array
{
int length;
int *A;
};
int FindDuplicates(struct Array arr)
{
for (int i = 0; i < arr.length; i++)
{
int count = 1;
if (arr.A[i] != -1)
{
for (int j = i + 1; j < arr.length; j++)
... | 6 |
Vatsal-Shingala-1011/Data-Structures-And-Algorithms | 3bc4b36 | sort/shell_sort.c | C | www.github.com/Vatsal-Shingala-1011/Data-Structures-And-Algorithms/tree/main/sort/shell_sort.c | https://raw.githubusercontent.com/Vatsal-Shingala-1011/Data-Structures-And-Algorithms/3bc4b36/sort/shell_sort.c | Vatsal-Shingala-1011/Data-Structures-And-Algorithms 3bc4b36 sort/shell_sort.c | true | 200 | 824 | #include <stdio.h>
void swap(int *a, int *b)
{
int c = *a;
*a = *b;
*b = c;
}
void shell_sort(int *a, int n) // arguments are array, size
{
int gap = n / 2;
while (gap >= 1)
{
for (int j = gap; j < n; j++)
{
for (int i = j - gap; i >= 0; i = i - gap)
{
... | 0 |
adeolaxdeus/alx-low_level_programming | a01c7b7 | 0x01-variables_if_else_while/102-print_comb5.c | C | www.github.com/adeolaxdeus/alx-low_level_programming/tree/main/0x01-variables_if_else_while/102-print_comb5.c | https://raw.githubusercontent.com/adeolaxdeus/alx-low_level_programming/a01c7b7/0x01-variables_if_else_while/102-print_comb5.c | adeolaxdeus/alx-low_level_programming a01c7b7 0x01-variables_if_else_while/102-print_comb5.c | true | 200 | 492 | #include <stdio.h>
/**
* main - Entry point
*
* Return: Always 0
*/
int main(void)
{
int num1 = 00;
int num2;
while (num1 < 99)
{
num2 = 01;
while (num2 < 100)
{
if (num2 > num1)
{
putchar(num1 / 10 + 0x30);
putchar(num1 % 10 + 0x30);
putchar(' ');
putchar(num2 / 10 + 0x30);
put... | 4 |
u201314147/onlin | 733c809 | decompile/General/MAIN/MainInit_VRAMDisplay.c | C | www.github.com/u201314147/onlin/tree/main/decompile/General/MAIN/MainInit_VRAMDisplay.c | https://raw.githubusercontent.com/u201314147/onlin/733c809/decompile/General/MAIN/MainInit_VRAMDisplay.c | u201314147/onlin 733c809 decompile/General/MAIN/MainInit_VRAMDisplay.c | true | 200 | 524 | #include <common.h>
void DECOMP_MainInit_VRAMDisplay()
{
RECT r;
DR_MOVE move;
short x[2];
short y[2];
#ifdef REBUILD_PC
PsyX_BeginScene();
#endif
x[0] = 0;
x[1] = 0x100;
y[0] = 0;
y[1] = 0x128;
for(int i = 0; i < 2; i++)
{
for(int j = 0; j < 2; j++)
{
r.x = x[i] + 0x200;
r.y = 0x10c;
r.... | 3 |
Secatricia/holbertonschool-low_level_programming | 0c8d0bd | 0x04-more_functions_nested_loops/10-print_triangle.c | C | www.github.com/Secatricia/holbertonschool-low_level_programming/tree/main/0x04-more_functions_nested_loops/10-print_triangle.c | https://raw.githubusercontent.com/Secatricia/holbertonschool-low_level_programming/0c8d0bd/0x04-more_functions_nested_loops/10-print_triangle.c | Secatricia/holbertonschool-low_level_programming 0c8d0bd 0x04-more_functions_nested_loops/10-print_triangle.c | true | 200 | 349 | #include "main.h"
/**
* print_triangle - faire des figures
*
*@size: variable
*/
void print_triangle(int size)
{
int i = 1;
int j;
while (i <= size)
{
j = 0;
while (j < size - i)
{
_putchar(' ');
j++;
}
while (j < size)
{
_putchar('#');
j++;
}
_putchar('\n');
i++;
}
if (size <= ... | 7 |
nielssp/plet | 3dfd429 | src/markdown.h | C | www.github.com/nielssp/plet/tree/main/src/markdown.h | https://raw.githubusercontent.com/nielssp/plet/3dfd429/src/markdown.h | nielssp/plet 3dfd429 src/markdown.h | true | 200 | 295 | /* Plet
* Copyright (c) 2021 Niels Sonnich Poulsen (http://nielssp.dk)
* Licensed under the MIT license.
* See the LICENSE file or http://opensource.org/licenses/MIT for more information.
*/
#ifndef MARKDOWN_H
#define MARKDOWN_H
#include "value.h"
void import_markdown(Env *env);
#endif
| 6 |
schroederjan/my42 | 9c15de8 | so_long/src/so_long.c | C | www.github.com/schroederjan/my42/tree/main/so_long/src/so_long.c | https://raw.githubusercontent.com/schroederjan/my42/9c15de8/so_long/src/so_long.c | schroederjan/my42 9c15de8 so_long/src/so_long.c | true | 200 | 1,478 | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* so_long.c :+: :+: :+: ... | 0 |
Shawaal-Nadeem/OS-Labs-Linux-Ubuntu | f44d674 | Lab 3/task7.c | C | www.github.com/Shawaal-Nadeem/OS-Labs-Linux-Ubuntu/tree/main/Lab 3/task7.c | https://raw.githubusercontent.com/Shawaal-Nadeem/OS-Labs-Linux-Ubuntu/f44d674/Lab%203/task7.c | Shawaal-Nadeem/OS-Labs-Linux-Ubuntu f44d674 Lab 3/task7.c | true | 200 | 559 | #include<stdio.h>
struct Employee{
int id;
char name[15];
int age;
float pay;
};
int main (){
struct Employee obj;
printf("Enter Employee ID: ");
scanf("%d",&obj.id);
printf("\nEnter Employee Name: ");
scanf("%s",obj.name);
printf("\nEnter Employee Age: ");
scanf("%d",&obj.age);
printf("\nEnter Employee Pay: ");
scan... | 3 |
AmrTaman/monty | dd87ba3 | 2.pop.c | C | www.github.com/AmrTaman/monty/tree/main/2.pop.c | https://raw.githubusercontent.com/AmrTaman/monty/dd87ba3/2.pop.c | AmrTaman/monty dd87ba3 2.pop.c | true | 200 | 392 | #include "monty.h"
#include <stdio.h>
/**
* pop - function
* @head: head
* @line_number: line number
*
*/
void pop(struct stack_s **head, unsigned int line_number)
{
if (*head == NULL)
{
fprintf(stderr, "L%d: can't pop an empty stack\n", line_number);
exit(EXIT_FAILURE);
}
else
{
struct stack_s *pointer... | 5 |
clemens29/Medienverwaltung-C | e94bc63 | main.c | C | www.github.com/clemens29/Medienverwaltung-C/tree/main/main.c | https://raw.githubusercontent.com/clemens29/Medienverwaltung-C/e94bc63/main.c | clemens29/Medienverwaltung-C e94bc63 main.c | true | 200 | 2,355 | // Clemens Näther, "22/042/P2"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include "medium.h"
char vBuf[128];
int main() {
tList *list = createList();
FILE* f;
f = fopen("data.txt", "rt");
if (f != NULL) {
DataIntoList(list, f);
... | 7 |
rahul-iitm23/-Course-Projects | cc6bd85 | APL/ADTS in C++/ListADT.C | C | www.github.com/rahul-iitm23/-Course-Projects/tree/main/APL/ADTS in C++/ListADT.C | https://raw.githubusercontent.com/rahul-iitm23/-Course-Projects/cc6bd85/APL/ADTS%20in%20C%2B%2B/ListADT.C | rahul-iitm23/-Course-Projects cc6bd85 APL/ADTS in C++/ListADT.C | true | 200 | 1,782 | /**************************************************************************
* $Id$
* Release $Name$
*
* File: ListADTArray.C - Implementation of lists using an linked list
*
* Purpose:
*
* Author: Rahul Kumar
*
* Created: Mon 20-Sep-2020
*
* Last modified:
*
* Bugs:
*
* Change Log: <Dat... | 4 |
Memotech-Bill/MEMU | ae893b0 | src/memu/mon.c | C | www.github.com/Memotech-Bill/MEMU/tree/main/src/memu/mon.c | https://raw.githubusercontent.com/Memotech-Bill/MEMU/ae893b0/src/memu/mon.c | Memotech-Bill/MEMU ae893b0 src/memu/mon.c | true | 200 | 36,230 | /*
mon.c - 80 column card and its monitor
This code can maintain a detailed model of the state of the 80 column card,
and its associated low level driver code.
A basic emulation of the 6845 CRTC chip and the memory behind it is done.
The driver protocol documented in FDX manual is implemented, as per ACRT.MAC.
SCPM i... | 2 |
hail-pas/project-based-training | 3ca85c5 | C/memalloc.c | C | www.github.com/hail-pas/project-based-training/tree/main/C/memalloc.c | https://raw.githubusercontent.com/hail-pas/project-based-training/3ca85c5/C/memalloc.c | hail-pas/project-based-training 3ca85c5 C/memalloc.c | true | 200 | 3,324 | #include<stdio.h>
#include<stdlib.h>
#include<pthread.h>
#include<string.h>
#include<unistd.h>
typedef char ALIGN[16];
pthread_mutex_t global_malloc_lock;
union header
{
struct {
size_t size;
unsigned is_free;
union header * next;
} s;
ALIGN stub;
};
typedef union header header_t... | 6 |
popmonac/alx-low_level_programming | 4d4e817 | 0x01-variables_if_else_while/4-print_alphabt.c | C | www.github.com/popmonac/alx-low_level_programming/tree/main/0x01-variables_if_else_while/4-print_alphabt.c | https://raw.githubusercontent.com/popmonac/alx-low_level_programming/4d4e817/0x01-variables_if_else_while/4-print_alphabt.c | popmonac/alx-low_level_programming 4d4e817 0x01-variables_if_else_while/4-print_alphabt.c | true | 200 | 239 | #include <stdio.h>
/**
* main - Entry point for the code
*
* Return: (0) (Success)
*/
int main(void)
{
char l;
l = 'a';
while (l <= 'z')
{
if (l == 'e' || l == 'q')
l++;
putchar(l);
l++;
}
putchar('\n');
return (0);
}
| 0 |
arronwelch/C | 16d44cd | code/Exercise in K&R/5.12 Complicated Declarations/dcl.c | C | www.github.com/arronwelch/C/tree/main/code/Exercise in K&R/5.12 Complicated Declarations/dcl.c | https://raw.githubusercontent.com/arronwelch/C/16d44cd/code/Exercise%20in%20K%26R/5.12%20Complicated%20Declarations/dcl.c | arronwelch/C 16d44cd code/Exercise in K&R/5.12 Complicated Declarations/dcl.c | true | 200 | 4,098 | /*
* char **argv
* -> argv: pointer to pointer to char
*
* int (*daytab)[13]
* -> daytab: pointer to array[13] of int
*
* int *daytab[13]
* -> daytab: array[13] of pointer to int
*
* void *comp()
* -> comp: function returning pointer to void
*
* void (*comp)()
* -> comp: pointer to function ... | 3 |
jnkUHaFnir/human-vs-ai | acd396c | 5-1_specific-119/specific-119_137.c | C | www.github.com/jnkUHaFnir/human-vs-ai/tree/main/5-1_specific-119/specific-119_137.c | https://raw.githubusercontent.com/jnkUHaFnir/human-vs-ai/acd396c/5-1_specific-119/specific-119_137.c | jnkUHaFnir/human-vs-ai acd396c 5-1_specific-119/specific-119_137.c | true | 200 | 701 | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
void get(char **string) {
int size = 1;
*string = malloc(size);
char c;
int i = 0;
while (1) {
c = getchar();
if (c == '\n') {
break;
}
(*string)[i] = c;
i++;
*string = realloc(*s... | 5 |
Abdelsattar-Muhammad/ATmega32-V02- | 6fc9934 | 02 MCAL/05 UART/UART_program.c | C | www.github.com/Abdelsattar-Muhammad/ATmega32-V02-/tree/main/02 MCAL/05 UART/UART_program.c | https://raw.githubusercontent.com/Abdelsattar-Muhammad/ATmega32-V02-/6fc9934/02%20MCAL/05%20UART/UART_program.c | Abdelsattar-Muhammad/ATmega32-V02- 6fc9934 02 MCAL/05 UART/UART_program.c | true | 200 | 4,706 | /*************************************/
/* Author : Abdelsattar Muhammad */
/* Date : 28 FEB 2024 */
/* Version : V02 */
/* MCU : ATMEGA32 */
/*************************************/
#include "DATA_TYPES.h"
#include "BIT_MATH.h"
#include "UART_interface.h"
#inc... | 7 |
Zerotay/programming_basic_by_c | 0f420e6 | 06_week/homework04.c | C | www.github.com/Zerotay/programming_basic_by_c/tree/main/06_week/homework04.c | https://raw.githubusercontent.com/Zerotay/programming_basic_by_c/0f420e6/06_week/homework04.c | Zerotay/programming_basic_by_c 0f420e6 06_week/homework04.c | true | 200 | 317 | #include <stdio.h>
int main(void)
{
int i, n, sum;
printf("정수를 입력하시오:");
scanf("%d", &n);
i = 2; //2부터가 맞는 듯?
sum = 0;
while (i <= n)
{
sum += i;
i+=2;
}
printf("1부터 %d까지의 짝수합은 %d입니다\n", n, sum);
return 0;
} | 1 |
Afolatobs/alx-low_level_programming | 0ae0b63 | 0x02-functions_nested_loops/11-print_to_98.c | C | www.github.com/Afolatobs/alx-low_level_programming/tree/main/0x02-functions_nested_loops/11-print_to_98.c | https://raw.githubusercontent.com/Afolatobs/alx-low_level_programming/0ae0b63/0x02-functions_nested_loops/11-print_to_98.c | Afolatobs/alx-low_level_programming 0ae0b63 0x02-functions_nested_loops/11-print_to_98.c | true | 200 | 428 | #include "main.h"
#include <stdio.h>
/**
* print_to_98 - prints all natural member form n to 98
* @n: The number to start printing from
* Return: Always 0.
*/
void print_to_98(int n)
{
if (n <= 98)
{
for (; n <= 98; n++)
{
if (n == 98)
{
printf("%d", n);
printf("\n");
break;
}
else
{
printf("%d, ", n);
}
}
}
el... | 6 |
dodme/Study_C | 3df9a39 | C언어 2회차/평일겜프1/평일겜프1/13_이것은문제다.c | C | www.github.com/dodme/Study_C/tree/main/C언어 2회차/평일겜프1/평일겜프1/13_이것은문제다.c | https://raw.githubusercontent.com/dodme/Study_C/3df9a39/C%EC%96%B8%EC%96%B4%202%ED%9A%8C%EC%B0%A8/%ED%8F%89%EC%9D%BC%EA%B2%9C%ED%94%841/%ED%8F%89%EC%9D%BC%EA%B2%9C%ED%94%841/13_%EC%9D%B4%EA%B2%83%EC%9D%80%EB%AC%B8%EC%A0%9C%EB%8B%A4.c | dodme/Study_C 3df9a39 C언어 2회차/평일겜프1/평일겜프1/13_이것은문제다.c | true | 200 | 402 | #include <stdio.h>
#include <string.h>
#pragma warning (disable : 4996)
// num��ŭ ���ڸ� �ڷ� �̴� �Լ�?
void Push(char* str, int num, int length)
{
for (int i = 0; i < length; i++)
{
str[i] += num;
}
}
int main()
{
char str[256] = {0};
int num = 0;
printf("���ڿ��� ������ �Է��ϼ���.\n");
gets(str);
scanf("%d", ... | 2 |
AlexGyver/Dilutor | 0999016 | firmware/Dilutor/waiter.h | C | www.github.com/AlexGyver/Dilutor/tree/main/firmware/Dilutor/waiter.h | https://raw.githubusercontent.com/AlexGyver/Dilutor/0999016/firmware/Dilutor/waiter.h | AlexGyver/Dilutor 0999016 firmware/Dilutor/waiter.h | true | 200 | 293 | #pragma once
#include <Arduino.h>
#include "timer.h"
struct Waiter {
Waiter(uint16_t prd) {
tout.setMode(TMR_TIMER);
tout.setPrd(prd);
}
bool wait(bool value) {
if (!value) tout.start();
return tout.ready();
}
void stop() {
tout.stop();
}
Timer tout;
};
| 4 |
daweiyou/Porting-Yaffs2-on-NXP-i.MXRT1050 | fe9d7a9 | yaffs_nand_freertos_V2.0/yaffs_nand_freertos/source/yaffs2/port/yaffscfg2k.c | C | www.github.com/daweiyou/Porting-Yaffs2-on-NXP-i.MXRT1050/tree/main/yaffs_nand_freertos_V2.0/yaffs_nand_freertos/source/yaffs2/port/yaffscfg2k.c | https://raw.githubusercontent.com/daweiyou/Porting-Yaffs2-on-NXP-i.MXRT1050/fe9d7a9/yaffs_nand_freertos_V2.0/yaffs_nand_freertos/source/yaffs2/port/yaffscfg2k.c | daweiyou/Porting-Yaffs2-on-NXP-i.MXRT1050 fe9d7a9 yaffs_nand_freertos_V2.0/yaffs_nand_freertos/source/yaffs2/port/yaffscfg2k.c | true | 200 | 4,273 | /*
* YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
*
* Copyright (C) 2002-2018 Aleph One Ltd.
*
* Created by Charles Manning <charles@aleph1.co.uk>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2... | 0 |
fredliums/Algorithms | cdeef68 | section6/chapter23/p_mst.c | C | www.github.com/fredliums/Algorithms/tree/main/section6/chapter23/p_mst.c | https://raw.githubusercontent.com/fredliums/Algorithms/cdeef68/section6/chapter23/p_mst.c | fredliums/Algorithms cdeef68 section6/chapter23/p_mst.c | true | 200 | 2,126 | #include <stdio.h>
#include <stdlib.h>
#include "heap/heap.h"
#define NV 9
#define NE 14
typedef struct _GNode {
int key;
int id;
char name;
struct _GNode *pi;
} GNode;
typedef struct _Graph {
GNode V[NV];
int (*E)[NV];
} Graph;
typedef struct _Edge {
GNode *u;
GNode *v;
int w;
... | 3 |
Junie06/alx-low_level_programming | f1e0694 | 0x08-recursion/6-is_prime_number.c | C | www.github.com/Junie06/alx-low_level_programming/tree/main/0x08-recursion/6-is_prime_number.c | https://raw.githubusercontent.com/Junie06/alx-low_level_programming/f1e0694/0x08-recursion/6-is_prime_number.c | Junie06/alx-low_level_programming f1e0694 0x08-recursion/6-is_prime_number.c | true | 200 | 478 | #include "main.h"
/**
* is_prime_number - function that returns prime numbers
* @n: number passed
* Return: 0
*/
int is_prime_number(int n)
{
if (n <= 1)
return (0);
return (actual_prime(n, n - 1));
}
/**
* actual_prime - calculates prime recursively
* @n: number to calculate
* @i: iterator
* Return: 1 if ... | 1 |
mayonorris/alx-low_level_programming | ec7b55d | 0x07-pointers_arrays_strings/2-strchr.c | C | www.github.com/mayonorris/alx-low_level_programming/tree/main/0x07-pointers_arrays_strings/2-strchr.c | https://raw.githubusercontent.com/mayonorris/alx-low_level_programming/ec7b55d/0x07-pointers_arrays_strings/2-strchr.c | mayonorris/alx-low_level_programming ec7b55d 0x07-pointers_arrays_strings/2-strchr.c | true | 200 | 350 | #include "main.h"
#include <stdio.h>
/**
* _strchr - A function that locates a character in a string.
* @s: an input string to search
* @c: an input character to locate into string s
* Return: returns pointer or NULL
*
*/
char *_strchr(char *s, char c)
{
while (*s >= '\0')
{
if (*s == c)
{
return (s);
... | 6 |
JonathanSanch/RailCipher-Encrypter-Decrypter | 0ff6b3d | Assignment 2/main.c | C | www.github.com/JonathanSanch/RailCipher-Encrypter-Decrypter/tree/main/Assignment 2/main.c | https://raw.githubusercontent.com/JonathanSanch/RailCipher-Encrypter-Decrypter/0ff6b3d/Assignment%202/main.c | JonathanSanch/RailCipher-Encrypter-Decrypter 0ff6b3d Assignment 2/main.c | true | 200 | 4,036 | #include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <encrypt.c>
#include <decrypt.c>
#include <math.h>
#define TRUE 1
#define FALSE 0
#define NOT_2_CLAS 1
#define error(code,message) do{fprintf(stderr, "%s\n", message);return code;}while(0)
int check_integer(char* str){
if(strlen(str) == 0)
re... | 2 |
Emmabbhub/alx-low_level_programming | 476c637 | 0x01-variables_if_else_while/6-print_numberz.c | C | www.github.com/Emmabbhub/alx-low_level_programming/tree/main/0x01-variables_if_else_while/6-print_numberz.c | https://raw.githubusercontent.com/Emmabbhub/alx-low_level_programming/476c637/0x01-variables_if_else_while/6-print_numberz.c | Emmabbhub/alx-low_level_programming 476c637 0x01-variables_if_else_while/6-print_numberz.c | true | 200 | 250 | #include <stdio.h>
/**
* main - prints numbers 0-9 without using char or printf/puts,
*
* and putchar 2x max
*
* Return: 0 on success
*/
int main(void)
{
int i = '0';
while (i <= '9')
{
putchar(i);
i++;
}
putchar('\n');
return (0);
}
| 5 |
ophrbs/FAETERJ-Rio | 10ea785 | 1FAC/Lista 05/Lista05-07.c | C | www.github.com/ophrbs/FAETERJ-Rio/tree/main/1FAC/Lista 05/Lista05-07.c | https://raw.githubusercontent.com/ophrbs/FAETERJ-Rio/10ea785/1FAC/Lista%2005/Lista05-07.c | ophrbs/FAETERJ-Rio 10ea785 1FAC/Lista 05/Lista05-07.c | true | 200 | 939 | /* QUESTÃO 07:
Desenvolver um programa no qual o
usuário entre com vários números inteiros
e positivos e imprima o produto dos
números ímpares e a soma dos números
pares. */
#include <stdio.h>
void main()
{
int i, n, soma = 0, produto = 1;
char sair;
do
{
printf("\nInsira um numero inteiro positivo... | 7 |
monkey-boy17/Etat_nombre | ab35029 | Algorithme_Valeur.c | C | www.github.com/monkey-boy17/Etat_nombre/tree/main/Algorithme_Valeur.c | https://raw.githubusercontent.com/monkey-boy17/Etat_nombre/ab35029/Algorithme_Valeur.c | monkey-boy17/Etat_nombre ab35029 Algorithme_Valeur.c | true | 200 | 451 | #include<stdio.h>
#include<stdlib.h>
int main()
{
int Positif = 0;
int Negatif = 0;
int Nombre;
int i;
for(i = 0; i < 11; i++){
printf("taper un nombre\n");
scanf("%d",&Nombre);
if (Nombre > 0){
Positif++;
}else{
Negatif++;
... | 0 |
eddy16112/mpi_wrap | 11bb316 | impl.h | C | www.github.com/eddy16112/mpi_wrap/tree/main/impl.h | https://raw.githubusercontent.com/eddy16112/mpi_wrap/11bb316/impl.h | eddy16112/mpi_wrap 11bb316 impl.h | true | 200 | 3,438 | /* Copyright 2024 NVIDIA Corporation
*
* 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... | 4 |
hiawath/structC | 2de0443 | ch4/src/linkedList.c | C | www.github.com/hiawath/structC/tree/main/ch4/src/linkedList.c | https://raw.githubusercontent.com/hiawath/structC/2de0443/ch4/src/linkedList.c | hiawath/structC 2de0443 ch4/src/linkedList.c | true | 200 | 2,313 | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "linkedList.h"
linkedList_h* createLinkedList_h(void) {
linkedList_h* L;
L = (linkedList_h*)malloc(sizeof(linkedList_h));
L->head = NULL;
return L;
}
void freeLinkedList_h(linkedList_h* L) {
listNode* p;
while (L->head != NULL) {
p = L->head... | 3 |
connellr023/rpi3-drivers | 550b52b | include/mbox.h | C | www.github.com/connellr023/rpi3-drivers/tree/main/include/mbox.h | https://raw.githubusercontent.com/connellr023/rpi3-drivers/550b52b/include/mbox.h | connellr023/rpi3-drivers 550b52b include/mbox.h | true | 200 | 2,255 | /*
* Copyright (C) 2018 bzt (bztsrc@github)
* Modified 2024 by connellr023@github
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation ... | 1 |
writeer/C-_study | 8940c25 | exercise/eight_homework/caps_lower_count3.c | C | www.github.com/writeer/C-_study/tree/main/exercise/eight_homework/caps_lower_count3.c | https://raw.githubusercontent.com/writeer/C-_study/8940c25/exercise/eight_homework/caps_lower_count3.c | writeer/C-_study 8940c25 exercise/eight_homework/caps_lower_count3.c | true | 200 | 457 | #include <stdio.h>
#include <ctype.h>
/*这个程序统计大小写字符个数*/
int main(void){
char ch;
int caps,letter;
caps = letter = 0;
while ((ch = getchar()) != EOF)
{
if (islower(ch) != 0)
{
letter++;
}
else if (isupper(ch) != 0)
{
caps++;
}
... | 6 |
Eramogul/alx-low_level_programming | 558af72 | 0x02-functions_nested_loops/4-isalpha.c | C | www.github.com/Eramogul/alx-low_level_programming/tree/main/0x02-functions_nested_loops/4-isalpha.c | https://raw.githubusercontent.com/Eramogul/alx-low_level_programming/558af72/0x02-functions_nested_loops/4-isalpha.c | Eramogul/alx-low_level_programming 558af72 0x02-functions_nested_loops/4-isalpha.c | true | 200 | 320 | #include "main.h"
/**
* _isalpha - Checks if a character is alphabetic
* @c: The character to check (expected to be an ASCII value)
*
* Return: 1 if c is a letter, lowercase or uppercase, 0 otherwise
*/
int _isalpha(int c)
{
if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'))
return (1);
else
return (0);
}
| 2 |
kema-ray/alx-low_level_programming | b1336ba | test/sum.c | C | www.github.com/kema-ray/alx-low_level_programming/tree/main/test/sum.c | https://raw.githubusercontent.com/kema-ray/alx-low_level_programming/b1336ba/test/sum.c | kema-ray/alx-low_level_programming b1336ba test/sum.c | true | 200 | 424 | #include <stdio.h>
// Calculates the sum and average marks for 5 students
void main()
{
int marks[5], i;
float sum = 0, avg;
printf("Enter the marks of 5 students:");
for (i = 0; i < 5; i++)
{
scanf("%d", &marks[i]);
}
for (i = 0; i < 5; i++)
{
sum = sum + marks[i];
... | 7 |
RandyVen/OpenMP | e40da41 | trapezoidesFor.c | C | www.github.com/RandyVen/OpenMP/tree/main/trapezoidesFor.c | https://raw.githubusercontent.com/RandyVen/OpenMP/e40da41/trapezoidesFor.c | RandyVen/OpenMP e40da41 trapezoidesFor.c | true | 200 | 1,532 | #include <stdio.h>
#include <stdlib.h>
#include <omp.h>
#include <time.h>
double trapezoide(double a, double b, int n, int thread_count);
double f(double x);
double get_wall_time();
int main(int argc, char **argv)
{
double a, b;
int n;
int thread_count;
thread_count = strtol(argv[1... | 0 |
wolf2627/os | a4728bb | Threading.c | C | www.github.com/wolf2627/os/tree/main/Threading.c | https://raw.githubusercontent.com/wolf2627/os/a4728bb/Threading.c | wolf2627/os a4728bb Threading.c | true | 200 | 845 | #include <stdio.h>
#include <string.h>
#include <pthread.h>
#include <stdlib.h>
#include <unistd.h>
pthread_t tid[2];
void* doSomeThing(void *arg) {
unsigned long i = 0;
pthread_t id = pthread_self();
if(pthread_equal(id, tid[0])) {
printf("\n First thread processing\n");
} else {
pri... | 5 |
lawkelvin33/BaekjoonCodingPractice | 7d9d499 | baekjoon2164.c | C | www.github.com/lawkelvin33/BaekjoonCodingPractice/tree/main/baekjoon2164.c | https://raw.githubusercontent.com/lawkelvin33/BaekjoonCodingPractice/7d9d499/baekjoon2164.c | lawkelvin33/BaekjoonCodingPractice 7d9d499 baekjoon2164.c | true | 200 | 880 | #include<stdio.h>
int main(){
int N;
scanf("%d", &N);
int arr[N];
int tmp;
int c;
for(int i=0;i<N;i++)
arr[i] = i+1; //arr[0] = 1, arr[1] = 2, ... arr[n-1] = n
tmp = N;
while(tmp>1){
if(tmp % 2 == 1){ //홀수일 경우
tmp /= 2;
c = arr[1];
... | 4 |
RochKDev/Linux_Threads | fb16298 | Codes/processValref.c | C | www.github.com/RochKDev/Linux_Threads/tree/main/Codes/processValref.c | https://raw.githubusercontent.com/RochKDev/Linux_Threads/fb16298/Codes/processValref.c | RochKDev/Linux_Threads fb16298 Codes/processValref.c | true | 200 | 746 | #include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <sys/wait.h>
#include <sys/types.h>
struct SharedData{
int val;
};
int main(int argc, char const *argv[])
{
struct SharedData* data;
// Allocation dynamique pour la structure SharedData
data = (struct SharedData*)malloc(sizeof(struct SharedData... | 3 |
RenzoMaggiori/Lemin | 2d8578e | lib/my_printf/fl_s.c | C | www.github.com/RenzoMaggiori/Lemin/tree/main/lib/my_printf/fl_s.c | https://raw.githubusercontent.com/RenzoMaggiori/Lemin/2d8578e/lib/my_printf/fl_s.c | RenzoMaggiori/Lemin 2d8578e lib/my_printf/fl_s.c | true | 200 | 1,239 | /*
** EPITECH PROJECT, 2022
** mini_printf
** File description:
** fl_s
*/
#include "my.h"
#include "my_printf.h"
void print_spaces(int strlen, int min_w, int *len)
{
for (int i = 0; strlen + i < min_w; i++) {
my_putchar(' ');
*len += 1;
}
}
void my_put_str_flags(char *str, flags_t fl... | 6 |
anulanjewar0504/world_of_C | dfd1705 | Practice/prac-2.c | C | www.github.com/anulanjewar0504/world_of_C/tree/main/Practice/prac-2.c | https://raw.githubusercontent.com/anulanjewar0504/world_of_C/dfd1705/Practice/prac-2.c | anulanjewar0504/world_of_C dfd1705 Practice/prac-2.c | true | 200 | 400 | #include<stdio.h>
int main(){
// area of square
float sides, redius;
const float pi = 3.14;
printf("Enter the length of side of square: ");
scanf("%f",&sides);
printf("Area is: %f",sides*sides);
// area of circle
printf("\nEnter the length of redius: ");
scanf("%f",&r... | 0 |
PrinssiFiestas/LockFreeC | abcae44 | tests.c | C | www.github.com/PrinssiFiestas/LockFreeC/tree/main/tests.c | https://raw.githubusercontent.com/PrinssiFiestas/LockFreeC/abcae44/tests.c | PrinssiFiestas/LockFreeC abcae44 tests.c | true | 200 | 2,924 | #include "lfc.h"
#include "gpc.h"
#include <pthread.h>
#include <signal.h>
#include <x86intrin.h>
GPArena arena;
// This value is only for testing. Normally, you want a buffer size that fits in
// L3 cache. Why L3? L3 is the cache that is shared between cores so it will be
// the fastest.
#define QUEUE_BUF_SIZE (1 <<... | 1 |
arthurepitech/my_printf | 08e731a | src/check_format.c | C | www.github.com/arthurepitech/my_printf/tree/main/src/check_format.c | https://raw.githubusercontent.com/arthurepitech/my_printf/08e731a/src/check_format.c | arthurepitech/my_printf 08e731a src/check_format.c | true | 200 | 598 | /*
** EPITECH PROJECT, 2022
** Part II
** File description:
** check_format
*/
#include "../include/my.h"
#include <stdarg.h>
void check_format(const char *format, va_list list, my_struct_t *mem)
{
char *flag_f = "#*+\0";
int (*l_call[3])(va_list list, my_struct_t *mem, const char *format) =
{print_ha... | 2 |
VarshiniGowdaV/-librarymanagement- | e7aa427 | book.c | C | www.github.com/VarshiniGowdaV/-librarymanagement-/tree/main/book.c | https://raw.githubusercontent.com/VarshiniGowdaV/-librarymanagement-/e7aa427/book.c | VarshiniGowdaV/-librarymanagement- e7aa427 book.c | true | 200 | 5,577 | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "book.h"
struct book* book_head = NULL;
struct book* add_book(struct book* book_head, char* name, char* title, int book_id, char* author) {
// Allocate memory for a new book
struct book* new_book = (struct book*)malloc(sizeof(struct ... | 4 |
qian119-w/COMP4300-ParallelMM | 5c425c3 | code/PartA/mpi_cannon.c | C | www.github.com/qian119-w/COMP4300-ParallelMM/tree/main/code/PartA/mpi_cannon.c | https://raw.githubusercontent.com/qian119-w/COMP4300-ParallelMM/5c425c3/code/PartA/mpi_cannon.c | qian119-w/COMP4300-ParallelMM 5c425c3 code/PartA/mpi_cannon.c | true | 200 | 8,898 | /**
* @file mpi_cannon.c
* @brief
* Square processor layout -- "round-down" approach
* (comm_sz - grid_sz * grid_sz) number of processes is not utilized. (idle)
*
* MPI_Sendrecv_replace for Cannon data "shift"s in rows and columns
*/
#include <stdio.h>
#include <stdlib.h>
#include <mpi.h>
#include <math.h>
#i... | 5 |
mbeka02/CSC322 | 5926214 | concurrent-connection-oriented/calculator_client.c | C | www.github.com/mbeka02/CSC322/tree/main/concurrent-connection-oriented/calculator_client.c | https://raw.githubusercontent.com/mbeka02/CSC322/5926214/concurrent-connection-oriented/calculator_client.c | mbeka02/CSC322 5926214 concurrent-connection-oriented/calculator_client.c | true | 200 | 3,427 |
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <arpa/inet.h>
#include "data.h"
#include "calculator.h"
#define PORT 5173
#define BUFFER_SIZE 1024
struct Calculator_data which_functionality();
int main() {
int sockfd;
struct sockaddr_in server_addr;
char buffer[BUFFER_SIZE];
sock... | 7 |
AdamCelermajer/homework | f3aac6f | mavoC/ex_2/ex_2.c | C | www.github.com/AdamCelermajer/homework/tree/main/mavoC/ex_2/ex_2.c | https://raw.githubusercontent.com/AdamCelermajer/homework/f3aac6f/mavoC/ex_2/ex_2.c | AdamCelermajer/homework f3aac6f mavoC/ex_2/ex_2.c | true | 200 | 17,477 | /******************************************
*Student name: adam celermajer
*Student ID:332638592
*Exercise name: ex1
******************************************/
#include <stdio.h>
#include <math.h>
#define FALSE 0
#define ZERO 0
#define TRUE 1
#define TEN 10
#define BINARY 2
#define SEVEN 7
#define... | 3 |
henthornlab/ectf-trainer | 27948cc | fob/ectf/fob/ping.c | C | www.github.com/henthornlab/ectf-trainer/tree/main/fob/ectf/fob/ping.c | https://raw.githubusercontent.com/henthornlab/ectf-trainer/27948cc/fob/ectf/fob/ping.c | henthornlab/ectf-trainer 27948cc fob/ectf/fob/ping.c | true | 200 | 244 |
#include "shell.h"
int send_ping(int argc, char** argv) {
printf("Pinging the car.\n");
printf2("FOB_MESG PING\n");
return 0;
}
// ADD_CMD(command, description, function name);
ADD_CMD(ping, "Pings the other board", send_ping);
| 2 |
Jacolanterns/Tugas-Besar-EL2208-Praktikum-Pemecahan-Masalah-dengan-C | 42d20d3 | main.c | C | www.github.com/Jacolanterns/Tugas-Besar-EL2208-Praktikum-Pemecahan-Masalah-dengan-C/tree/main/main.c | https://raw.githubusercontent.com/Jacolanterns/Tugas-Besar-EL2208-Praktikum-Pemecahan-Masalah-dengan-C/42d20d3/main.c | Jacolanterns/Tugas-Besar-EL2208-Praktikum-Pemecahan-Masalah-dengan-C 42d20d3 main.c | true | 200 | 12,885 | #include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
#include <math.h>
#include <time.h>
#include <float.h>
#include <limits.h>
#define MAX_CITIES 100
#define RADIUS_EARTH 6371
#define PI 3.14159265358979323846
typedef struct {
char name[50];
double latitude;
dou... | 0 |
Ferjodios/Sistemas_distribuidos_sockets_TCP | 748dca1 | proxy.c | C | www.github.com/Ferjodios/Sistemas_distribuidos_sockets_TCP/tree/main/proxy.c | https://raw.githubusercontent.com/Ferjodios/Sistemas_distribuidos_sockets_TCP/748dca1/proxy.c | Ferjodios/Sistemas_distribuidos_sockets_TCP 748dca1 proxy.c | true | 200 | 9,168 | #include "proxy.h"
#include <string.h>
#include <stdio.h>
#include <sys/types.h>
#include <stdlib.h>
#include <netdb.h>
#include <arpa/inet.h>
#include <sys/socket.h>
#include <unistd.h>
#include <errno.h>
//Métodos proporcionados por los profesores
static int sendMessage(int socket, char * buffer, int len)
{
int r;
... | 5 |
Thirteen0001/GD32F407_FreeRTOS | 138d554 | 01-多任务/Hardware/NIXIE/Nixie.c | C | www.github.com/Thirteen0001/GD32F407_FreeRTOS/tree/main/01-多任务/Hardware/NIXIE/Nixie.c | https://raw.githubusercontent.com/Thirteen0001/GD32F407_FreeRTOS/138d554/01-%E5%A4%9A%E4%BB%BB%E5%8A%A1/Hardware/NIXIE/Nixie.c | Thirteen0001/GD32F407_FreeRTOS 138d554 01-多任务/Hardware/NIXIE/Nixie.c | true | 200 | 1,873 | #include "Nixie.h"
static void GPIO_init(uint32_t rcu, uint32_t port, uint32_t pin) {
rcu_periph_clock_enable(rcu);
gpio_mode_set(port, GPIO_MODE_OUTPUT, GPIO_PUPD_NONE, pin);
gpio_output_options_set(port, GPIO_OTYPE_PP, GPIO_OSPEED_MAX, pin);
}
// ��ʼ��
void Nixie_init() {
GPIO_init(NIX_DI_RCU, NIX_... | 1 |
sara-ahmadd/alx-low_level_programming | 8062c0e | 0x13-more_singly_linked_lists/10-delete_nodeint.c | C | www.github.com/sara-ahmadd/alx-low_level_programming/tree/main/0x13-more_singly_linked_lists/10-delete_nodeint.c | https://raw.githubusercontent.com/sara-ahmadd/alx-low_level_programming/8062c0e/0x13-more_singly_linked_lists/10-delete_nodeint.c | sara-ahmadd/alx-low_level_programming 8062c0e 0x13-more_singly_linked_lists/10-delete_nodeint.c | true | 200 | 606 | #include "lists.h"
#include <stdio.h>
#include <stdlib.h>
/**
* delete_nodeint_at_index - delete node at index
* @head: head node
* @index: the req index
* Return: 1 if succeded
*/
int delete_nodeint_at_index(listint_t **head, unsigned int index)
{
listint_t *curr, *prev;
unsigned int i = 0;
if (!*head)
{
... | 7 |
SickestOne/42_Work | 20377f9 | push_swap/pb.c | C | www.github.com/SickestOne/42_Work/tree/main/push_swap/pb.c | https://raw.githubusercontent.com/SickestOne/42_Work/20377f9/push_swap/pb.c | SickestOne/42_Work 20377f9 push_swap/pb.c | true | 200 | 1,861 | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* pb.c :+: :+: :+: ... | 4 |
aryan-angra/dsaCLanuage | 5e2358b | b2darray2.c | C | www.github.com/aryan-angra/dsaCLanuage/tree/main/b2darray2.c | https://raw.githubusercontent.com/aryan-angra/dsaCLanuage/5e2358b/b2darray2.c | aryan-angra/dsaCLanuage 5e2358b b2darray2.c | true | 200 | 1,013 | #include<stdio.h>
int main(){
int arr1[4][4], arr2[4][4], result[4][4], i , j;
// take user input for matrics :
printf("\n\nMatrix 1 consists of 4 rows and 4 columns\n\n");
for(i=0;i<4;i++){
for(j=0;j<4;j++){
printf("enter arr1[%d][%d] : ",i,j);
scanf("%d",&arr1[i][j]);... | 6 |
Fss7/dataset | 9d1c820 | CodeJamData/11/01/0.c | C | www.github.com/Fss7/dataset/tree/main/CodeJamData/11/01/0.c | https://raw.githubusercontent.com/Fss7/dataset/9d1c820/CodeJamData/11/01/0.c | Fss7/dataset 9d1c820 CodeJamData/11/01/0.c | true | 200 | 1,115 | #include <stdio.h>
int b[1024],o[1024],bn,on,bb,oo;
char r[1024];
int main() {
int caseno=1,cases,i,n,v,tid,pos,opos,bpos;
int omove,bmove,pushed;
char s[16];
scanf("%d",&cases);
while(cases--) {
bn=on=0;
scanf("%d",&n);
for(i=0;i<n;i++) {
scanf("%s",s);
scanf("%d",&v);
r[i]=s[... | 7 |
Rishisingh96/C-programmar | 77a3bfd | 7_Loop/32 Continue statment(enter your ager ) continue chalta rahega.c | C | www.github.com/Rishisingh96/C-programmar/tree/main/7_Loop/32 Continue statment(enter your ager ) continue chalta rahega.c | https://raw.githubusercontent.com/Rishisingh96/C-programmar/77a3bfd/7_Loop/32%20Continue%20statment%28enter%20your%20ager%20%29%20continue%20chalta%20rahega.c | Rishisingh96/C-programmar 77a3bfd 7_Loop/32 Continue statment(enter your ager ) continue chalta rahega.c | true | 200 | 364 | #include <stdio.h>
void main()
{
int i,age;
for(i=0; i<5; i++ )
{
printf("Iteration time %d\n Enter your age :",i);
scanf("%d",&age);
if(age<18)
{continue;}
printf("Hey Guys\n");
printf("This code is printed coz if codition is not satisfied \n");
printf("Checking Continue stateme... | 2 |
Tarokh-Yaghoubi/C | c5bcf8b | The Linux Programming Interface/Chapter 5/t_truncate.c | C | www.github.com/Tarokh-Yaghoubi/C/tree/main/The Linux Programming Interface/Chapter 5/t_truncate.c | https://raw.githubusercontent.com/Tarokh-Yaghoubi/C/c5bcf8b/The%20Linux%20Programming%20Interface/Chapter%205/t_truncate.c | Tarokh-Yaghoubi/C c5bcf8b The Linux Programming Interface/Chapter 5/t_truncate.c | true | 200 | 1,918 |
/*
* Author : Tarokh Yaghoubi (Jacob)
* Descriptor : An example on truncate system call
*
* */
/*
* #include <unistd.h>
* int truncate(const char *pathname, off_t length);
* int ftruncate(int fd, off_t length);
*
* Both Return 0 on Success, or -1 on ERROR
*
* */
/*
* th... | 1 |
Utkarsh-1771/C-programs-beginner | c52119a | first_upper.c | C | www.github.com/Utkarsh-1771/C-programs-beginner/tree/main/first_upper.c | https://raw.githubusercontent.com/Utkarsh-1771/C-programs-beginner/c52119a/first_upper.c | Utkarsh-1771/C-programs-beginner c52119a first_upper.c | true | 200 | 288 | #include<stdio.h>
#include<string.h>
int main()
{
int i;
char s[10000],str[10000];
scanf("%[^\n]str",s);
//scanf("\n");
//scanf("%[^\n]s",str);
strlwr(s);
for(i=0;s[i]!='\0';i++)
{
s[0]=toupper(s[0]);
if(s[i]==(int)32)
s[i+1]=toupper(s[i+1]);
}
puts(s);
} | 5 |
Fss7/dataset | 9d1c820 | AtCoder dataset/abc115/A/4535825.c | C | www.github.com/Fss7/dataset/tree/main/AtCoder dataset/abc115/A/4535825.c | https://raw.githubusercontent.com/Fss7/dataset/9d1c820/AtCoder%20dataset/abc115/A/4535825.c | Fss7/dataset 9d1c820 AtCoder dataset/abc115/A/4535825.c | true | 200 | 345 | #include <stdio.h>
int main() {
int D, i;
scanf("%d", &D);
printf("Christmas");
for(i = 0; i < 25 - D; i++) {
printf(" Eve");
}
printf("\n");
return 0;
} ./Main.c: In function �main�:
./Main.c:5:3: warning: ignoring return value of �scanf�, declared with attribute warn_unused_result [-Wunused-result]... | 4 |
Nadra187/Cassignment1 | 6cf1f80 | 16pal_word.c | C | www.github.com/Nadra187/Cassignment1/tree/main/16pal_word.c | https://raw.githubusercontent.com/Nadra187/Cassignment1/6cf1f80/16pal_word.c | Nadra187/Cassignment1 6cf1f80 16pal_word.c | true | 200 | 579 | //to check palindrome of a word
//time complexity: O(no.of characters in string)
//as characters are integers and string is the list of characters.
//so as the value of string
#include<stdio.h>
#include<string.h>
int main(){
int l,n;
char s[10];
printf("Enter the word.\t");
scanf("%s",s... | 0 |
swoyamrajbhandari/SENG-265-C-Python | 6dcf6c8 | a1/event_manager.c | C | www.github.com/swoyamrajbhandari/SENG-265-C-Python/tree/main/a1/event_manager.c | https://raw.githubusercontent.com/swoyamrajbhandari/SENG-265-C-Python/6dcf6c8/a1/event_manager.c | swoyamrajbhandari/SENG-265-C-Python 6dcf6c8 a1/event_manager.c | true | 200 | 13,772 | /** @file event_manager.c
* @brief A pipes & filters program that uses conditionals, loops, and string processing tools in C to process iCalendar
* events and printing them in a user-friendly format.
* @author Felipe R.
* @author Hausi M.
* @author Jose O.
* @author Victoria L.
* @author Swoyam Raj... | 6 |
Poookk/C-language | 2537974 | C-Project/a8.c | C | www.github.com/Poookk/C-language/tree/main/C-Project/a8.c | https://raw.githubusercontent.com/Poookk/C-language/2537974/C-Project/a8.c | Poookk/C-language 2537974 C-Project/a8.c | true | 200 | 1,081 | #include <stdio.h>
#include <ctype.h>
int main()
{
char question[][100]={"1.What Gojo name?","2.What Ben10 granpa?","3.What is your mother name?"};
char choices[][100]={"A.Gojo","B.Yuji Itadori","C.Megumi","D.Ben10",
"A.Gwen","B.Pumax","C.Jetray","D.Ghostfish",
"... | 7 |
GabinDDL/L2_S4_C_TP | f371be5 | TP7/Exercice2.c | C | www.github.com/GabinDDL/L2_S4_C_TP/tree/main/TP7/Exercice2.c | https://raw.githubusercontent.com/GabinDDL/L2_S4_C_TP/f371be5/TP7/Exercice2.c | GabinDDL/L2_S4_C_TP f371be5 TP7/Exercice2.c | true | 200 | 1,639 | #include <string.h>
#include <stdio.h>
#include <stdlib.h>
typedef struct
{
int nbr;
char **words;
} w_index;
void free_index(w_index *pi);
void print_index(w_index *pi);
int size_words(w_index *pi);
char *concat_words(w_index *pi);
int size_words(w_index *pi);
w_index *cons_index(const char *s);
int main()
... | 5 |
Shraddha2306/basic-programs | f65ad57 | practice.c | C | www.github.com/Shraddha2306/basic-programs/tree/main/practice.c | https://raw.githubusercontent.com/Shraddha2306/basic-programs/f65ad57/practice.c | Shraddha2306/basic-programs f65ad57 practice.c | true | 200 | 265 | #include<stdio.h>
int main()
{
int n,i,m;
printf("enter number:\n");
scanf("%d",&n);
m=n/2;
for(i=2;i<m;i++)
{
if(n%i==0)
printf("not prime!");
else
printf("prime!");
}
return 0;
}
| 2 |
subhash42/DAA-LAB | d8409b8 | minmaxkumar3.c | C | www.github.com/subhash42/DAA-LAB/tree/main/minmaxkumar3.c | https://raw.githubusercontent.com/subhash42/DAA-LAB/d8409b8/minmaxkumar3.c | subhash42/DAA-LAB d8409b8 minmaxkumar3.c | true | 200 | 841 | #include<stdio.h>
struct pair
{
int min;
int max;
};
struct pair getMinMax(int arr[], int n)
{
struct pair minmax;
int i;
if (n == 1)
{
minmax.max = arr[0];
minmax.min = arr[0];
return minmax;
}
if (arr[0] > arr[1])
{
minmax.max = arr[0];
minmax.min = ar... | 1 |
eyramakua/alx-low_level_programming | 7ae7656 | 0x0E-structures_typedef/4-new_dog.c | C | www.github.com/eyramakua/alx-low_level_programming/tree/main/0x0E-structures_typedef/4-new_dog.c | https://raw.githubusercontent.com/eyramakua/alx-low_level_programming/7ae7656/0x0E-structures_typedef/4-new_dog.c | eyramakua/alx-low_level_programming 7ae7656 0x0E-structures_typedef/4-new_dog.c | true | 200 | 1,361 | #include "dog.h"
#include <stdlib.h>
int _strlen(char *s);
char *_strcpy(char *dest, char *src);
/**
* new_dog - creates a new dog
*
* @name: name of dog
* @age: age of the dog
* @owner: owner of the dog
*
* Return: NULL if it fails
*/
dog_t *new_dog(char *name, float age, char *owner)
{
dog_t *mune;
int cp... | 4 |
Chimezie1283/alx-low_level_programming | 5a38116 | 0x0E-structures_typedef/1-init_dog.c | C | www.github.com/Chimezie1283/alx-low_level_programming/tree/main/0x0E-structures_typedef/1-init_dog.c | https://raw.githubusercontent.com/Chimezie1283/alx-low_level_programming/5a38116/0x0E-structures_typedef/1-init_dog.c | Chimezie1283/alx-low_level_programming 5a38116 0x0E-structures_typedef/1-init_dog.c | true | 200 | 424 | #include "dog.h"
#include <stdlib.h>
/**
* init_dog - A function thatinitializes a variable of type struct dog
* @d: pointer to struct dog
* @name: The name to be initialized
* @age: The age to be initialized
* @owner: owner to be initialized
*/
void init_dog(struct dog *d, char *name, float age, char *owner)
{... | 0 |
jesperkha/socklib | 7ff3bae | src/socklib.c | C | www.github.com/jesperkha/socklib/tree/main/src/socklib.c | https://raw.githubusercontent.com/jesperkha/socklib/7ff3bae/src/socklib.c | jesperkha/socklib 7ff3bae src/socklib.c | true | 200 | 2,838 | #define __SOCKET__
#include "socket.h"
#define DEBUG 0
static char sockerr[128] = {0};
// Print socket error message
void print_sockerr()
{
if (DEBUG)
perror("socket: ");
fprintf(stderr, "socket: %s\n", sockerr);
}
// Sets sockerr message
void set_sockerr(const char *msg)
{
strcpy(sockerr, msg);... | 6 |
DuyLinhDang/lib_stm32 | 56a7130 | 10_Flash - Copy/myFlash.c | C | www.github.com/DuyLinhDang/lib_stm32/tree/main/10_Flash - Copy/myFlash.c | https://raw.githubusercontent.com/DuyLinhDang/lib_stm32/56a7130/10_Flash%20-%20Copy/myFlash.c | DuyLinhDang/lib_stm32 56a7130 10_Flash - Copy/myFlash.c | true | 200 | 2,129 | #include "myFlash.h"
#include "String"
#define PAGE_SIZE 1024
#define PAGE_NUM 127
//doc flash
void Read_Flash(uint32_t Addr, void *data_read,uint32_t NumByteToRead) { // vi tri,
memcpy(data, (void *)(Addr), NumByteToRead);
}
//ghi flash, tra ve trang thai ghi duoc khong
statusFlash Write_Flash(u32 Add... | 7 |
tdagn2202/ELSE_Structure | aeec620 | ELSE_Structure_12.c | C | www.github.com/tdagn2202/ELSE_Structure/tree/main/ELSE_Structure_12.c | https://raw.githubusercontent.com/tdagn2202/ELSE_Structure/aeec620/ELSE_Structure_12.c | tdagn2202/ELSE_Structure aeec620 ELSE_Structure_12.c | true | 200 | 698 | #include <stdio.h>
#include <stdlib.h>
typedef struct PhanSo {
int TuSo, MauSo;
} ps;
void inPhanSo(ps a) {
printf("%d/%d\n", a.TuSo, a.MauSo);
}
void chuanhoa(ps *pa) {
int rs, i;
for (i = 1; i <= pa->TuSo || i <= pa->MauSo; i++) {
if ((pa->TuSo % i == 0) && (pa->MauSo % i == 0)) rs = i;
... | 2 |
longgu02/DSA-lab | 06e5d62 | week5/sudokuMarkArray.c | C | www.github.com/longgu02/DSA-lab/tree/main/week5/sudokuMarkArray.c | https://raw.githubusercontent.com/longgu02/DSA-lab/06e5d62/week5/sudokuMarkArray.c | longgu02/DSA-lab 06e5d62 week5/sudokuMarkArray.c | true | 200 | 1,955 | #include <stdlib.h>
#include <stdio.h>
#include <stdbool.h>
int boardtest[9][9] = {
{ 3, 7, 8, 9, 2, 6, 4, 1, 5 },
{ 4, 2, 9, 1, 5, 0, 0, 6, 0 },
{ 5, 6, 1, 3, 4, 0, 9, 2, 0 },
{ 1, 9, 6, 7, 0, 5, 2, 8, 4 },
{ 7, 4, 5, 2, 8, 1, 0, 9, 0 },
{ 0, 0, 2, 4, 6, 9, 0, 5, 7 },
{ 9, 8, 4, 5, 1,... | 5 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.