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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
FurkanAdalar/school | ba5e0a0 | lab7-1.c | C | www.github.com/FurkanAdalar/school/tree/main/lab7-1.c | https://raw.githubusercontent.com/FurkanAdalar/school/ba5e0a0/lab7-1.c | FurkanAdalar/school ba5e0a0 lab7-1.c | true | 200 | 398 | #include <stdio.h>
#include <stdlib.h>
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
int main() {
int sayi1,sayi2,toplam;
printf("Bir sayi girin: ");
scanf("%d",&sayi1);
printf("Bir sayi daha girin: ");
scanf("%d",&sayi2);
toplam=sayi... | 5 |
heyhex/C | 96bd60e | data_structure/Designing assignment/4.3/4.3.c | C | www.github.com/heyhex/C/tree/main/data_structure/Designing assignment/4.3/4.3.c | https://raw.githubusercontent.com/heyhex/C/96bd60e/data_structure/Designing%20assignment/4.3/4.3.c | heyhex/C 96bd60e data_structure/Designing assignment/4.3/4.3.c | true | 200 | 781 | #include"4.2.c"
void Reverse(StringType *s)
{
StringType result,temp;
int len=StrLength(*s);
result.ch=temp.ch=NULL;
result.length=temp.length=0;
while(len)
{
temp=SubString(*s,len,1);
result=Concat(result,temp);
len--;
}
StrAssign(s,result);
if (temp.ch... | 2 |
yughias/PV-1000-Emulator | 596e237 | include/psg.h | C | www.github.com/yughias/PV-1000-Emulator/tree/main/include/psg.h | https://raw.githubusercontent.com/yughias/PV-1000-Emulator/596e237/include/psg.h | yughias/PV-1000-Emulator 596e237 include/psg.h | true | 200 | 404 | #ifndef __PSG_H__
#define __PSG_H__
#include "SDL2/SDL.h"
#include <stdbool.h>
#define ASIC_FREQ 17.897727e6
#define CALCULATE_SQUARE_FREQ(x) (ASIC_FREQ / 1024) / (63 - x)
#define HOST_GAIN 16
typedef struct psg_t {
float time_elapsed;
float updateRate;
float square_freq[3];
bool enabled;
bool ... | 7 |
EliotAlxSe/alx-low_level_programming | b97431e | 0x13-more_singly_linked_lists/0-print_listint.c | C | www.github.com/EliotAlxSe/alx-low_level_programming/tree/main/0x13-more_singly_linked_lists/0-print_listint.c | https://raw.githubusercontent.com/EliotAlxSe/alx-low_level_programming/b97431e/0x13-more_singly_linked_lists/0-print_listint.c | EliotAlxSe/alx-low_level_programming b97431e 0x13-more_singly_linked_lists/0-print_listint.c | true | 200 | 284 | #include "lists.h"
/**
* print_listint - prints all the elements of a listint_t list.
* @h: linked list
*
* Return: number of nodes
*/
size_t print_listint(const listint_t *h)
{
size_t num = 0;
while (h)
{
printf("%d\n", h->n);
num++;
h = h->next;
}
return (num);
}
| 4 |
eyramakua/alx-low_level_programming | 7ae7656 | 0x08-recursion/100-is_palindrome.c | C | www.github.com/eyramakua/alx-low_level_programming/tree/main/0x08-recursion/100-is_palindrome.c | https://raw.githubusercontent.com/eyramakua/alx-low_level_programming/7ae7656/0x08-recursion/100-is_palindrome.c | eyramakua/alx-low_level_programming 7ae7656 0x08-recursion/100-is_palindrome.c | true | 200 | 988 | #include "main.h"
int _strlen(char *s);
int f_fab(char *s, int top, int down);
/**
* is_palindrome - Checks if a string is palindrome
*
* @s: string to check
*
* Return: 1 if it is palindrome, 0 if otherwise
*/
int is_palindrome(char *s)
{
int den = _strlen(s);
if (den <= 1)
{
return (1);
}
else
{
re... | 0 |
ShivamRai0420/C-CPP | 7dcfd92 | C apna college/average.c | C | www.github.com/ShivamRai0420/C-CPP/tree/main/C apna college/average.c | https://raw.githubusercontent.com/ShivamRai0420/C-CPP/7dcfd92/C%20apna%20college/average.c | ShivamRai0420/C-CPP 7dcfd92 C apna college/average.c | true | 200 | 196 | #include<stdio.h>
int main()
{
int x,y,z;
printf("enter no.");
scanf("\n%i%i%i",&x,&y,&z);
int sum=x+y+z;
int average=sum/3;
printf("%i",average);
return 0;
} | 1 |
jlmedina123/davi | ec8bce4 | copyvaluereference.c | C | www.github.com/jlmedina123/davi/tree/main/copyvaluereference.c | https://raw.githubusercontent.com/jlmedina123/davi/ec8bce4/copyvaluereference.c | jlmedina123/davi ec8bce4 copyvaluereference.c | true | 200 | 305 |
#include <stdio.h>
void imprimea(int s) {
printf("%d\n", s);
}
void cambiaa(int s) {
s = 5;
}
void cambiap(int *p) {
*p = 6;
}
int main()
{
int a = 4;
imprimea(a);
cambiaa(a);
imprimea(a);
int *p = &a;
cambiap(p);
imprimea(a);
return 0;
}
| 6 |
PBnJK/randomart | df9d1e3 | src/main.c | C | www.github.com/PBnJK/randomart/tree/main/src/main.c | https://raw.githubusercontent.com/PBnJK/randomart/df9d1e3/src/main.c | PBnJK/randomart df9d1e3 src/main.c | true | 200 | 8,636 | /* RandomArt
* Entry point for the terminal application
*/
#include <inttypes.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#define STB_IMAGE_WRITE_IMPLEMENTATION
#include "stb_image_write.h"
#include "ast.h"
#include "l... | 5 |
Sasuke-kh/alx-low_level_programming | 1e2e8b7 | 0x10-variadic_functions/1-print_numbers.c | C | www.github.com/Sasuke-kh/alx-low_level_programming/tree/main/0x10-variadic_functions/1-print_numbers.c | https://raw.githubusercontent.com/Sasuke-kh/alx-low_level_programming/1e2e8b7/0x10-variadic_functions/1-print_numbers.c | Sasuke-kh/alx-low_level_programming 1e2e8b7 0x10-variadic_functions/1-print_numbers.c | true | 200 | 530 | #include <stdio.h>
#include <stdarg.h>
#include "variadic_functions.h"
/**
* print_numbers - prints numbers followed by a new line
* @separator: string to be printed between numbers
* @n: number of integers passed to the function
*/
void print_numbers(const char *separator, const unsigned int n, ...)
{
va_list a... | 3 |
Ronald-tech/alx-low_level_programming | c9d3e71 | 0x04-more_functions_nested_loops/6-print_line.c | C | www.github.com/Ronald-tech/alx-low_level_programming/tree/main/0x04-more_functions_nested_loops/6-print_line.c | https://raw.githubusercontent.com/Ronald-tech/alx-low_level_programming/c9d3e71/0x04-more_functions_nested_loops/6-print_line.c | Ronald-tech/alx-low_level_programming c9d3e71 0x04-more_functions_nested_loops/6-print_line.c | true | 200 | 292 | #include "main.h"
/**
* print_line - print a straight line
*
*@n: is the number of times the _ character should be printed
*
*/
void print_line(int n)
{
int lnChr;
if (n <= 0)
_putchar('\n');
else
{
for (lnChr = 1; lnChr <= n; lnChr++)
_putchar('_');
_putchar('\n');
}
}
| 2 |
qwas982/lian-xi | d363181 | 一个编译器写作之旅/声明.h | C | www.github.com/qwas982/lian-xi/tree/main/一个编译器写作之旅/声明.h | https://raw.githubusercontent.com/qwas982/lian-xi/d363181/%E4%B8%80%E4%B8%AA%E7%BC%96%E8%AF%91%E5%99%A8%E5%86%99%E4%BD%9C%E4%B9%8B%E6%97%85/%E5%A3%B0%E6%98%8E.h | qwas982/lian-xi d363181 一个编译器写作之旅/声明.h | true | 200 | 2,821 | // 所有编译器文件的函数原型
//扫描.c
int 扫描(struct 牌 *牌子);
//树.c
// 创建二元操作的AST节点
struct 抽象句法树节点 *制作抽象句法树节点(int 操作, struct 抽象句法树节点 *左子树,
struct 抽象句法树节点 *右子树, int 整型值);
// 创建叶子节点的AST节点
struct 抽象句法树节点 *制作抽象句法树叶子(int 操作, int 整型值);
// 创建一元操作的AST节点
struct 抽象句法树节点 *制作抽象句法树一元(int 操作, struct 抽象句法树节点 *左子树, int 整型值);
... | 4 |
Mally13/binary_trees | 8505b5f | 104-binary_tree_rotate_right.c | C | www.github.com/Mally13/binary_trees/tree/main/104-binary_tree_rotate_right.c | https://raw.githubusercontent.com/Mally13/binary_trees/8505b5f/104-binary_tree_rotate_right.c | Mally13/binary_trees 8505b5f 104-binary_tree_rotate_right.c | true | 200 | 706 | #include "binary_trees.h"
/**
* binary_tree_rotate_right - Performs right rotation ofa a binary tree
* @tree: pointer to the root node of the tree to be rotated
* Return: pointer to the new node once rotated
*/
binary_tree_t *binary_tree_rotate_right(binary_tree_t *tree)
{
binary_tree_t *new_root, *tmp;
if (tre... | 0 |
serenaOlivera/Famaf-proyectos | 3b97dd4 | algo1/Proyecto4/sumatoria.c | C | www.github.com/serenaOlivera/Famaf-proyectos/tree/main/algo1/Proyecto4/sumatoria.c | https://raw.githubusercontent.com/serenaOlivera/Famaf-proyectos/3b97dd4/algo1/Proyecto4/sumatoria.c | serenaOlivera/Famaf-proyectos 3b97dd4 algo1/Proyecto4/sumatoria.c | true | 200 | 1,131 | #include <stdio.h>
#include <stdbool.h>
#include <assert.h>
/*
7. (Arreglos, Funcion sumatoria). Hacer un programa en un archivo con nombre sumatoria.c
que contenga la funcion
int sumatoria(int tam, int a[])
que recibe un tamano maximo de arreglo y un arreglo como argumento, y devuelve la suma
de sus elemento... | 7 |
Sammyregt/alx-low_level_programming | 2a42da7 | 0x0F-function_pointers/2-int_index.c | C | www.github.com/Sammyregt/alx-low_level_programming/tree/main/0x0F-function_pointers/2-int_index.c | https://raw.githubusercontent.com/Sammyregt/alx-low_level_programming/2a42da7/0x0F-function_pointers/2-int_index.c | Sammyregt/alx-low_level_programming 2a42da7 0x0F-function_pointers/2-int_index.c | true | 200 | 559 | #include "function_pointers.h"
/**
* int_index - searches for an integer
*
* @array: input integer array
* @size: size of the array
* @cmp: pointer to the function to be used
* to compare
*
* Return: index of the first element for which the
* cmp function does not return 0. If no elements
* matches, return -... | 1 |
tracwov/alx-low_level_programming | cb7dc87 | 0x02-functions_nested_loops/3-islower.c | C | www.github.com/tracwov/alx-low_level_programming/tree/main/0x02-functions_nested_loops/3-islower.c | https://raw.githubusercontent.com/tracwov/alx-low_level_programming/cb7dc87/0x02-functions_nested_loops/3-islower.c | tracwov/alx-low_level_programming cb7dc87 0x02-functions_nested_loops/3-islower.c | true | 200 | 319 | #include "main.h"
/**
* _islower - shows 1 if the input is a
* lower character. Another cases, shows
* 0
*
* @c: The character in ASCII code
*
* Return: 1 for lowercase character. 0 for the rest.
*/
int _islower(int c)
{
if (c >= 97 && c <= 122)
{
return (1);
}
else
{
return (0);
}
_putchar('\n');
}
| 6 |
WD0LB/Secure-Boot | 96da277 | lib/bootloader.h | C | www.github.com/WD0LB/Secure-Boot/tree/main/lib/bootloader.h | https://raw.githubusercontent.com/WD0LB/Secure-Boot/96da277/lib/bootloader.h | WD0LB/Secure-Boot 96da277 lib/bootloader.h | true | 200 | 864 | #ifndef __BOOTLOADER_H
#define __BOOTLOADER_H
/* Configuration and Constants */
#define PUBLIC_KEY "pubkey"
#define SIGNATURE_ADDRESS (uint32_t)0x080FFFF0 // Example address
#define APP_ADDRESS (uint32_t)0x08008000
#define END_ADDRESS (uint32_t)0x080FFFFB
#define FIRMWARE_SIZE (END_ADDRESS - APP_ADDRESS + 1)
/* Fu... | 3 |
YuZane/ExpressTrain | e9f0669 | Device/MM32F5330/HAL_Lib/inc/hal_gpio.h | C | www.github.com/YuZane/ExpressTrain/tree/main/Device/MM32F5330/HAL_Lib/inc/hal_gpio.h | https://raw.githubusercontent.com/YuZane/ExpressTrain/e9f0669/Device/MM32F5330/HAL_Lib/inc/hal_gpio.h | YuZane/ExpressTrain e9f0669 Device/MM32F5330/HAL_Lib/inc/hal_gpio.h | true | 200 | 7,999 | /***********************************************************************************************************************
@file hal_gpio.h
@author VV TEAM
@brief THIS FILE CONTAINS ALL THE FUNCTIONS PROTOTYPES FOR THE GPIO FIRMWARE LIBRARY.
*********************************************************... | 5 |
JKWrist/CodePlayground | 4e2f2c8 | test_cpp/Data_Structure/Enterprise_Edition_Single_LinkList/Enterprise_Edition_Single_LinkList.c | C | www.github.com/JKWrist/CodePlayground/tree/main/test_cpp/Data_Structure/Enterprise_Edition_Single_LinkList/Enterprise_Edition_Single_LinkList.c | https://raw.githubusercontent.com/JKWrist/CodePlayground/4e2f2c8/test_cpp/Data_Structure/Enterprise_Edition_Single_LinkList/Enterprise_Edition_Single_LinkList.c | JKWrist/CodePlayground 4e2f2c8 test_cpp/Data_Structure/Enterprise_Edition_Single_LinkList/Enterprise_Edition_Single_LinkList.c | true | 200 | 5,557 | #include <stdio.h>
#include <string.h>
#include <stdlib.h>
//节点结构�?
struct LinkNode
{
struct LinkNode * next;
};
//链表结构�?
struct LList
{
struct LinkNode pHeader;
int m_size;
};
typedef void * LinkList;
/****************************************************************
* 函数名称�?
* 创建... | 2 |
brainface/havenmud | ae9eab3 | lib/domains/estergrym/areas/vampire/room/foyer.c | C | www.github.com/brainface/havenmud/tree/main/lib/domains/estergrym/areas/vampire/room/foyer.c | https://raw.githubusercontent.com/brainface/havenmud/ae9eab3/lib/domains/estergrym/areas/vampire/room/foyer.c | brainface/havenmud ae9eab3 lib/domains/estergrym/areas/vampire/room/foyer.c | true | 200 | 654 | // Foyer inside a gothic manor
// Alessandra 2014
#include <lib.h>
#include "../vamp.h"
inherit LIB_ROOM;
static void create() {
room::create();
SetClimate("indoors");
SetShort("the foyer of a gothic manor");
SetLong(
"This is a foyer. It's pronounced FoiAy because snooty. "
);
SetSmell( ([
"... | 0 |
kpatsakis/primevul8 | 48df1b0 | 164368.c | C | www.github.com/kpatsakis/primevul8/tree/main/164368.c | https://raw.githubusercontent.com/kpatsakis/primevul8/48df1b0/164368.c | kpatsakis/primevul8 48df1b0 164368.c | true | 200 | 1,595 | static void process_meta_command(conn *c, token_t *tokens, const size_t ntokens) {
assert(c != NULL);
if (tokens[KEY_TOKEN].length > KEY_MAX_LENGTH) {
out_string(c, "CLIENT_ERROR bad command line format");
return;
}
char *key = tokens[KEY_TOKEN].value;
size_t nkey = tokens[KEY_TOKE... | 7 |
wenyishengkingkong/jieli_test | f5011ad | apps/common/example/third_party/awtk/3rd/jerryscript/jerryscript/tests/unit-core/test-module-import-meta.c | C | www.github.com/wenyishengkingkong/jieli_test/tree/main/apps/common/example/third_party/awtk/3rd/jerryscript/jerryscript/tests/unit-core/test-module-import-meta.c | https://raw.githubusercontent.com/wenyishengkingkong/jieli_test/f5011ad/apps/common/example/third_party/awtk/3rd/jerryscript/jerryscript/tests/unit-core/test-module-import-meta.c | wenyishengkingkong/jieli_test f5011ad apps/common/example/third_party/awtk/3rd/jerryscript/jerryscript/tests/unit-core/test-module-import-meta.c | true | 200 | 5,912 | /* Copyright JS Foundation and other contributors, http://js.foundation
*
* 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 r... | 4 |
roba23/alx-low_level_programming | 9a2b8d2 | 0x07-pointers_arrays_strings/3-strspn.c | C | www.github.com/roba23/alx-low_level_programming/tree/main/0x07-pointers_arrays_strings/3-strspn.c | https://raw.githubusercontent.com/roba23/alx-low_level_programming/9a2b8d2/0x07-pointers_arrays_strings/3-strspn.c | roba23/alx-low_level_programming 9a2b8d2 0x07-pointers_arrays_strings/3-strspn.c | true | 200 | 475 | /**
* _strspn - number of bytes in the initial segment of
* `: s which consist only of bytes from accept
* @s: the string we want to examine
* @accept: string 2
* Return: return number of bytes
*/
unsigned int _strspn(char *s, char *accept)
{
int i, j;
unsigned int flag;
i = 0;
j = 0;
for (i = 0; s[i] != '\... | 1 |
Vedhanth123/DataStructures | beba1a2 | Algo/DynamicMemoryAllocation/calloc.c | C | www.github.com/Vedhanth123/DataStructures/tree/main/Algo/DynamicMemoryAllocation/calloc.c | https://raw.githubusercontent.com/Vedhanth123/DataStructures/beba1a2/Algo/DynamicMemoryAllocation/calloc.c | Vedhanth123/DataStructures beba1a2 Algo/DynamicMemoryAllocation/calloc.c | true | 200 | 579 |
#include <stdio.h>
#include <stdlib.h>
void main()
{
int n = 8;
int *pointer = (int*) calloc(n, sizeof(int)); // calloc
int *pointer = (int*) malloc(n * sizeof(int));// malloc
int *pointer = (int*) realloc(pointer, n* sizeof(int)); // realloc
if(pointer == NULL)
printf("Memor... | 6 |
k-mrm/Pilevisor | f2cac59 | include/vsm-log.h | C | www.github.com/k-mrm/Pilevisor/tree/main/include/vsm-log.h | https://raw.githubusercontent.com/k-mrm/Pilevisor/f2cac59/include/vsm-log.h | k-mrm/Pilevisor f2cac59 include/vsm-log.h | true | 200 | 761 | #ifndef VSM_LOG_H
#define VSM_LOG_H
#include "types.h"
#define VLOG_LEVEL 2
enum {
READ_SENDER,
READ_RECEIVER,
WRITE_SENDER,
WRITE_RECEIVER,
INV_SENDER,
INV_RECEIVER,
VSM_INFO,
};
struct vsmlog {
int type; // read or write or invalidate
int cpu;
u64 ipa;
const char *msg;
int from_node;
... | 5 |
komalranikar/CSEN1011 | 941920a | Q1casechange.c | C | www.github.com/komalranikar/CSEN1011/tree/main/Q1casechange.c | https://raw.githubusercontent.com/komalranikar/CSEN1011/941920a/Q1casechange.c | komalranikar/CSEN1011 941920a Q1casechange.c | true | 200 | 646 | /*
Develop a C program to convert upper-case character to a lower-case character & vice-versa.
It should display a message "Incorrect data" if a non-character is given as input.
Algorithm:-
1. 1. Start.
2. Input a character "a".
3. Check if num<=90 and num>=65,then print (a+32) value.
4. Else if num<=122 and n... | 3 |
SSC202/FreeRTOS | 2bce380 | Code/7_Count_Semaphore/BSP/oled.c | C | www.github.com/SSC202/FreeRTOS/tree/main/Code/7_Count_Semaphore/BSP/oled.c | https://raw.githubusercontent.com/SSC202/FreeRTOS/2bce380/Code/7_Count_Semaphore/BSP/oled.c | SSC202/FreeRTOS 2bce380 Code/7_Count_Semaphore/BSP/oled.c | true | 200 | 7,179 | #include <stdio.h>
#include <stdlib.h>
#include "oled.h"
#include "oled_font.h"
#define SYS_SUPPORT_OS 0
#if SYS_SUPPORT_OS
#include "FreeRTOS.h"
#include "task.h"
#endif
/**
* @brief 向SSD1306写入一个字节
* @param dat 要写入的数据/命令
* @param flag 数据/命令标志 0表示命令;1表示数据;
* @retval None
*/
void OLED_Write_Byte(unsigned char da... | 2 |
MaureenKwaku/alx-low_level_programming | 917396e | 0x13-more_singly_linked_lists/100-reverse_listint.c | C | www.github.com/MaureenKwaku/alx-low_level_programming/tree/main/0x13-more_singly_linked_lists/100-reverse_listint.c | https://raw.githubusercontent.com/MaureenKwaku/alx-low_level_programming/917396e/0x13-more_singly_linked_lists/100-reverse_listint.c | MaureenKwaku/alx-low_level_programming 917396e 0x13-more_singly_linked_lists/100-reverse_listint.c | true | 200 | 363 | #include "lists.h"
/**
* reverse_listint - reverse the listint_t
* @head: a parameter to be checked
* Return: returns *head
**/
listint_t *reverse_listint(listint_t **head)
{
listint_t *prev = NULL, *next = NULL;
while (*head != NULL)
{
next = (*head)->next;
(*head)->next = prev;
prev = *head;
*head = ... | 0 |
omkarjha/C_Programming | 5b72d67 | Code_Practise/struct.c | C | www.github.com/omkarjha/C_Programming/tree/main/Code_Practise/struct.c | https://raw.githubusercontent.com/omkarjha/C_Programming/5b72d67/Code_Practise/struct.c | omkarjha/C_Programming 5b72d67 Code_Practise/struct.c | true | 200 | 1,057 | #include <stdio.h>
#include <string.h>
struct employee
{
char name[15];
float salary;
int age;
};
// struct employee 2{
// char name[15];
// float salary;
// int age;
// };
// struct employee 3{
// char name[15];
// float salary;
// int age;
// };
// struct employee 4{
// char n... | 4 |
crdroidandroid/android_kernel_oneplus_sm8550-modules | 165c8bc | qcom/opensource/camera-kernel/drivers/oplus/cam_sensor_module/cam_ois/oplus_cam_ois_soc.h | C | www.github.com/crdroidandroid/android_kernel_oneplus_sm8550-modules/tree/main/qcom/opensource/camera-kernel/drivers/oplus/cam_sensor_module/cam_ois/oplus_cam_ois_soc.h | https://raw.githubusercontent.com/crdroidandroid/android_kernel_oneplus_sm8550-modules/165c8bc/qcom/opensource/camera-kernel/drivers/oplus/cam_sensor_module/cam_ois/oplus_cam_ois_soc.h | crdroidandroid/android_kernel_oneplus_sm8550-modules 165c8bc qcom/opensource/camera-kernel/drivers/oplus/cam_sensor_module/cam_ois/oplus_cam_ois_soc.h | true | 200 | 441 | /* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
*/
#ifndef _OPLUS_CAM_OIS_SOC_H_
#define _OPLUS_CAM_OIS_SOC_H_
#include "cam_ois_dev.h"
extern struct mutex actuator_ois_eeprom_shared_mutex;
extern bool actuator_ois_eeprom_shared_mutex_init_flag;
v... | 7 |
McLarrm/alx-low_level_programming | c47061d | 0x17-doubly_linked_lists/6-sum_dlistint.c | C | www.github.com/McLarrm/alx-low_level_programming/tree/main/0x17-doubly_linked_lists/6-sum_dlistint.c | https://raw.githubusercontent.com/McLarrm/alx-low_level_programming/c47061d/0x17-doubly_linked_lists/6-sum_dlistint.c | McLarrm/alx-low_level_programming c47061d 0x17-doubly_linked_lists/6-sum_dlistint.c | true | 200 | 272 | #include "lists.h"
/**
* sum_dlistint - Sums a dlistint list
* @head: Head of list
* Return: Sum of list elements. 0 if no list
*/
int sum_dlistint(dlistint_t *head)
{
int sum = 0;
while (head != NULL)
{
sum += head->n;
head = head->next;
}
return (sum);
}
| 1 |
MrSebastian626/HLS-Final-Project | f3ccf92 | Optimized/ecelinux/model.h | C | www.github.com/MrSebastian626/HLS-Final-Project/tree/main/Optimized/ecelinux/model.h | https://raw.githubusercontent.com/MrSebastian626/HLS-Final-Project/f3ccf92/Optimized/ecelinux/model.h | MrSebastian626/HLS-Final-Project f3ccf92 Optimized/ecelinux/model.h | true | 200 | 1,782 | //===========================================================================
// model.h
//===========================================================================
// @brief: This header file includes the parameters for the MLP
#ifndef MODEL_H
#define MODEL_H
#include "typedefs.h"
// Model parameters
const int N_... | 6 |
Linzi666/cpulspuls_code | 8e52ced | 2023.2/proaddrtest/test.c | C | www.github.com/Linzi666/cpulspuls_code/tree/main/2023.2/proaddrtest/test.c | https://raw.githubusercontent.com/Linzi666/cpulspuls_code/8e52ced/2023.2/proaddrtest/test.c | Linzi666/cpulspuls_code 8e52ced 2023.2/proaddrtest/test.c | true | 200 | 766 | #include<stdio.h>
#include<unistd.h>
int g_val = 100;
int main()
{
int pid = fork(); //创建子进程
if(pid == 0)
{
//child
int count = 5;
while(count)
{
printf("i am child , g_val = %d, &g_val = %p\n",g_val,&g_val);
if(count == 3)
{
//修改数据
printf("******开始修改数据*******\... | 5 |
benkeyben/alx-low_level_programming | 8f85162 | 0x01-variables_if_else_while/1-last_digit.c | C | www.github.com/benkeyben/alx-low_level_programming/tree/main/0x01-variables_if_else_while/1-last_digit.c | https://raw.githubusercontent.com/benkeyben/alx-low_level_programming/8f85162/0x01-variables_if_else_while/1-last_digit.c | benkeyben/alx-low_level_programming 8f85162 0x01-variables_if_else_while/1-last_digit.c | true | 200 | 593 | #include <stdio.h>
#include <stdlib.h>
#include <time.h>
/**
* main - Entry point
*
* Return: Always 0 (Success)
*/
/*Generating strings of random numbers to get the last digit */
int main(void)
{
int n, digit;
srand(time(0));
n = rand() - RAND_MAX / 2;
digit = n % 10;
if (digit > 5)
{
printf("Last dig... | 2 |
DeviousCardi/BTP | 720b738 | deepfix_data/prob167/correct/prog40908-user556.c | C | www.github.com/DeviousCardi/BTP/tree/main/deepfix_data/prob167/correct/prog40908-user556.c | https://raw.githubusercontent.com/DeviousCardi/BTP/720b738/deepfix_data/prob167/correct/prog40908-user556.c | DeviousCardi/BTP 720b738 deepfix_data/prob167/correct/prog40908-user556.c | true | 200 | 257 | #include<stdio.h>
int n;
void sum(int i,long int s)
{ long int a;
if(i==n)
{printf("%ld ", s); }
else
{printf("%ld ",s);
scanf("%ld",&a);
s=s+a;
sum(++i,s); } }
int main() {
scanf("%d",&n);
sum(0,0);
return 0; } | 4 |
AgustinaHeredia/philosophers | 5b2bc72 | srcs/dinner.c | C | www.github.com/AgustinaHeredia/philosophers/tree/main/srcs/dinner.c | https://raw.githubusercontent.com/AgustinaHeredia/philosophers/5b2bc72/srcs/dinner.c | AgustinaHeredia/philosophers 5b2bc72 srcs/dinner.c | true | 200 | 3,351 | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* dinner.c :+: :+: :+: ... | 0 |
Matildemm/pcto | 81ea169 | scaleno.c | C | www.github.com/Matildemm/pcto/tree/main/scaleno.c | https://raw.githubusercontent.com/Matildemm/pcto/81ea169/scaleno.c | Matildemm/pcto 81ea169 scaleno.c | true | 200 | 831 | #include <stdio.h>
int main()
{
int lato1;
int lato2;
int lato3;
printf("inserisci lunghezza lato1/n");
scanf("%d" , &lato1);
printf("inserisci lunghezza lato2/n");
scanf("%d" , &lato2);
printf("inserisci lunghezza lato3/n");
scanf("%d" , &lato3);
if((lato1 == lato2) && (lato2 =... | 7 |
Toluwaloju0/alx-low_level_programming | e52edf7 | 0x13-more_singly_linked_lists/4-free_listint.c | C | www.github.com/Toluwaloju0/alx-low_level_programming/tree/main/0x13-more_singly_linked_lists/4-free_listint.c | https://raw.githubusercontent.com/Toluwaloju0/alx-low_level_programming/e52edf7/0x13-more_singly_linked_lists/4-free_listint.c | Toluwaloju0/alx-low_level_programming e52edf7 0x13-more_singly_linked_lists/4-free_listint.c | true | 200 | 323 | #include "lists.h"
#include <stdlib.h>
/**
* free_listint - to free a linked list
* @head: the first item on the list
*/
void free_listint(listint_t *head)
{
listint_t *h = head;
listint_t *freed;
if (head == NULL)
{
return;
}
while (h->next != NULL)
{
freed = h->next;
free(h);
h = freed;
}
free(h);... | 1 |
Amineafilal/alx-low_level_programming | 8aa55ca | 0x05-pointers_arrays_strings/7-puts_half.c | C | www.github.com/Amineafilal/alx-low_level_programming/tree/main/0x05-pointers_arrays_strings/7-puts_half.c | https://raw.githubusercontent.com/Amineafilal/alx-low_level_programming/8aa55ca/0x05-pointers_arrays_strings/7-puts_half.c | Amineafilal/alx-low_level_programming 8aa55ca 0x05-pointers_arrays_strings/7-puts_half.c | true | 200 | 340 | #include "main.h"
/**
* puts_half - entry point
* @str: Integer value
* Description: Write a function that prints half of a string.
*/
void puts_half(char *str)
{
int len, half;
len = 0;
for (len = 0; str[len] != '\0' ; len++)
{}
half = (len + 1) / 2;
for (; half <= len - 1; half++)
{
putchar(str[half]);
... | 6 |
KwameElorm/alx-low_level_programming | fbbde70 | 0x0A-argc_argv/0-whatsmyname.c | C | www.github.com/KwameElorm/alx-low_level_programming/tree/main/0x0A-argc_argv/0-whatsmyname.c | https://raw.githubusercontent.com/KwameElorm/alx-low_level_programming/fbbde70/0x0A-argc_argv/0-whatsmyname.c | KwameElorm/alx-low_level_programming fbbde70 0x0A-argc_argv/0-whatsmyname.c | true | 200 | 256 | #include "main.h"
#include <stdio.h>
/**
*main - function to print name of a file
*@argv: defines arguement vector
*@argc: defines arguement count
*Return: 0
*/
int main(int argc, char *argv[])
{
(void) argc;
printf("%s\n", argv[0]);
return (0);
}
| 3 |
JustNobleMe/alx-low_level_programming | 3398643 | 0x04-more_functions_nested_loops/1-isdigit.c | C | www.github.com/JustNobleMe/alx-low_level_programming/tree/main/0x04-more_functions_nested_loops/1-isdigit.c | https://raw.githubusercontent.com/JustNobleMe/alx-low_level_programming/3398643/0x04-more_functions_nested_loops/1-isdigit.c | JustNobleMe/alx-low_level_programming 3398643 0x04-more_functions_nested_loops/1-isdigit.c | true | 200 | 244 | #include "main.h"
#include <stdio.h>
/**
* _isdigit - checks for a digit (0 through 9).
*
* @c: is an int
*
* Return: 1 if successful and 0 if not
*/
int _isdigit(int c)
{
if (c > 47 && c < 58)
{
return (1);
}
else
{
return (0);
}
}
| 5 |
Idralien/Common-core | 3d9f1b2 | cub3D/render_1.c | C | www.github.com/Idralien/Common-core/tree/main/cub3D/render_1.c | https://raw.githubusercontent.com/Idralien/Common-core/3d9f1b2/cub3D/render_1.c | Idralien/Common-core 3d9f1b2 cub3D/render_1.c | true | 200 | 2,321 | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* render_1.c :+: :+: :+: ... | 2 |
yd295826320/cse13e | 93b40ee | Lab08/Player.c | C | www.github.com/yd295826320/cse13e/tree/main/Lab08/Player.c | https://raw.githubusercontent.com/yd295826320/cse13e/93b40ee/Lab08/Player.c | yd295826320/cse13e 93b40ee Lab08/Player.c | true | 200 | 1,538 | #include "UNIXBOARD.h"
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include "Game.h"
#include "Player.h"
// Define how big the player's inventory is.
//#define INVENTORY_SIZE 4
//static var for number current have
//static array of chars
static uint8_t inventorySize = 0;
static uint... | 4 |
brennennen/sandbox | c80c922 | c/syscalls/signaling/sigpending.c | C | www.github.com/brennennen/sandbox/tree/main/c/syscalls/signaling/sigpending.c | https://raw.githubusercontent.com/brennennen/sandbox/c80c922/c/syscalls/signaling/sigpending.c | brennennen/sandbox c80c922 c/syscalls/signaling/sigpending.c | true | 200 | 4,428 | /*
gcc ./sigpending.c && ./a.out
"sigpending" is used to access signals sent by the OS that have not been processed
yet. Calls "rt_sigpending" (127) on Linux.
Most of the time signals should immediately be processed, and "sigpending" will return
nothing. However, if the process's main execution thread is in an "unint... | 0 |
ayon380/C | e05fd41 | 56_Calculator.c | C | www.github.com/ayon380/C/tree/main/56_Calculator.c | https://raw.githubusercontent.com/ayon380/C/e05fd41/56_Calculator.c | ayon380/C e05fd41 56_Calculator.c | true | 200 | 2,241 | #include <stdio.h>
#include <string.h>
#include <math.h>
int main()
{
int n, w;
char a[10], b;
printf("Enter 1 to perform Arithmetic operations or 2 to perform Trigonometric operations :");
scanf("%d", &n);
if (n == 1)
{
fflush(stdin);
printf("Enter what operation you want to do(... | 7 |
AjayVijayanand/MyCSJournalAJVJ | e4d57d5 | UniDays/Volume1_IE1005/Volume12_Week12/question1.c | C | www.github.com/AjayVijayanand/MyCSJournalAJVJ/tree/main/UniDays/Volume1_IE1005/Volume12_Week12/question1.c | https://raw.githubusercontent.com/AjayVijayanand/MyCSJournalAJVJ/e4d57d5/UniDays/Volume1_IE1005/Volume12_Week12/question1.c | AjayVijayanand/MyCSJournalAJVJ e4d57d5 UniDays/Volume1_IE1005/Volume12_Week12/question1.c | true | 200 | 358 | #include <stdlib.h>
#include <stdio.h>
int main(void){
int n[10] = {18, 3, 15, 7, 11, 9, 13, 5, 17, 1};
printf("Element Value Histogram\n");
for (int x = 0; x < 10; x++){
printf("%-16d%-14d", x, n[x]);
for (int y = 0; y < n[x]; y++){
printf("*");
}
... | 1 |
HessianZ/nrf-btmouse | 3c2b334 | src/main.c | C | www.github.com/HessianZ/nrf-btmouse/tree/main/src/main.c | https://raw.githubusercontent.com/HessianZ/nrf-btmouse/3c2b334/src/main.c | HessianZ/nrf-btmouse 3c2b334 src/main.c | true | 200 | 34,705 | /*
* Copyright (c) 2018 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/
#include <zephyr/types.h>
#include <stddef.h>
#include <string.h>
#include <errno.h>
#include <zephyr/sys/printk.h>
#include <zephyr/sys/byteorder.h>
#include <zephyr/kernel.h>
#include <zephyr/drivers/gpio.... | 6 |
waseemnaseeven/42_DevSecOps | 0044bfa | 27_RAINFALL/bonus3/source.c | C | www.github.com/waseemnaseeven/42_DevSecOps/tree/main/27_RAINFALL/bonus3/source.c | https://raw.githubusercontent.com/waseemnaseeven/42_DevSecOps/0044bfa/27_RAINFALL/bonus3/source.c | waseemnaseeven/42_DevSecOps 0044bfa 27_RAINFALL/bonus3/source.c | true | 200 | 610 | #include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
int main(int ac, char **av)
{
FILE *file;
int ret;
char buffer[132];
memset(buffer, 0, sizeof(buffer));
// Vérification des arguments et ouverture du fichier
file = fopen("/home/user/end/.pass", "r");
if ((!file) || (ac != 2)... | 3 |
naila-qamar/alx-low_level_programming | 0a30e96 | 0x02-functions_nested_loops/4-isalpha.c | C | www.github.com/naila-qamar/alx-low_level_programming/tree/main/0x02-functions_nested_loops/4-isalpha.c | https://raw.githubusercontent.com/naila-qamar/alx-low_level_programming/0a30e96/0x02-functions_nested_loops/4-isalpha.c | naila-qamar/alx-low_level_programming 0a30e96 0x02-functions_nested_loops/4-isalpha.c | true | 200 | 275 | #include "main.h"
/**
* _isalpha - Checks for an alphabetic character.
* @c: The character to check.
*
* Return: 1 if c is a letter (uppercase or lowercase), 0 otherwise.
*/
int _isalpha(int c)
{
return ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'));
}
| 2 |
Anwarr28/alx-low_level_programming | c860eb3 | 0x15-file_io/2-append_text_to_file.c | C | www.github.com/Anwarr28/alx-low_level_programming/tree/main/0x15-file_io/2-append_text_to_file.c | https://raw.githubusercontent.com/Anwarr28/alx-low_level_programming/c860eb3/0x15-file_io/2-append_text_to_file.c | Anwarr28/alx-low_level_programming c860eb3 0x15-file_io/2-append_text_to_file.c | true | 200 | 699 | #include "main.h"
/**
* append_text_to_file - function appends text at the end of a file.
* @filename: the name of the file to be created.
* @text_content: a NULL terminated string to write to the file.
*
* Return: 1 on success. -1 on failure or filename is NULL.
*/
int append_text_to_file(const char *file... | 4 |
maijiaxuan/learning | a2f1c9f | work_9_17/work_9_17/wor_9_17.c | C | www.github.com/maijiaxuan/learning/tree/main/work_9_17/work_9_17/wor_9_17.c | https://raw.githubusercontent.com/maijiaxuan/learning/a2f1c9f/work_9_17/work_9_17/wor_9_17.c | maijiaxuan/learning a2f1c9f work_9_17/work_9_17/wor_9_17.c | true | 200 | 1,561 | #define _CRT_SECURE_NO_WARNINGS 1
////ģ��ʵ��strcmp
//
//#include<stdio.h>
//#include<string.h>
//#include<assert.h>
//
//int my_strcmp(const char *s1,const char *s2)
//{
//assert(s1, s2);
// while(*s1==*s2)
// {
// if (*s1 == '\0')
// {
// return 0;
// }
// s1++;
// s2++;
// }
// return *s1 - *s2;
//}
//
//
/... | 0 |
ICOMP-UNC/setup-environment-francoriba | 32b1cbc | src/main.c | C | www.github.com/ICOMP-UNC/setup-environment-francoriba/tree/main/src/main.c | https://raw.githubusercontent.com/ICOMP-UNC/setup-environment-francoriba/32b1cbc/src/main.c | ICOMP-UNC/setup-environment-francoriba 32b1cbc src/main.c | true | 200 | 256 | #include <greetings.h>
#include <stdio.h>
#include "shared.h"
#include "static.h"
int main(int argc, char const *argv[])
{
printf("Hello, World. From main!\n");
greetings();
hello_static("Franco");
hello_shared("Franco");
return 0;
}
| 7 |
MrunalMuley/Project | cf5b3c1 | Programs(C,C++,java)/Program6.c | C | www.github.com/MrunalMuley/Project/tree/main/Programs(C,C++,java)/Program6.c | https://raw.githubusercontent.com/MrunalMuley/Project/cf5b3c1/Programs%28C%2CC%2B%2B%2Cjava%29/Program6.c | MrunalMuley/Project cf5b3c1 Programs(C,C++,java)/Program6.c | true | 200 | 295 | #include<stdio.h>
void Display(int iNo)
{
auto int iCnt = 0;
for( iCnt=1; iCnt<=iNo; iCnt++ )
{
printf(" * ");
}
}
int main()
{
auto int iValue = 0;
printf("Enter number:\n");
scanf("%d" ,&iValue);
Display(iValue);
return 0;
} | 5 |
kylebrussell/nuno-player | 63aea43 | include/nuno/hal_types.h | C | www.github.com/kylebrussell/nuno-player/tree/main/include/nuno/hal_types.h | https://raw.githubusercontent.com/kylebrussell/nuno-player/63aea43/include/nuno/hal_types.h | kylebrussell/nuno-player 63aea43 include/nuno/hal_types.h | true | 200 | 335 | #ifndef HAL_TYPES_H
#define HAL_TYPES_H
#ifdef BUILD_SIM
// Mock types for simulator
typedef struct {
void* Instance;
uint32_t Init;
uint32_t State;
} DMA_HandleTypeDef;
// Add other HAL types as needed
#else
// Include actual STM32 HAL headers for embedded build
#include "stm32h7xx_hal.h"
#endif
#endif ... | 1 |
MBEKE/alx-low_level_programming | 9bdd748 | 0x0B-malloc_free/100-argstostr.c | C | www.github.com/MBEKE/alx-low_level_programming/tree/main/0x0B-malloc_free/100-argstostr.c | https://raw.githubusercontent.com/MBEKE/alx-low_level_programming/9bdd748/0x0B-malloc_free/100-argstostr.c | MBEKE/alx-low_level_programming 9bdd748 0x0B-malloc_free/100-argstostr.c | true | 200 | 1,157 | #include <stdlib.h>
/**
* argstostr - Concatenates all program arguments.
* @ac: Number of arguments
* @av: Array of arguments
*
* Return: A pointer to a new string containing the concatenated
* arguments or NULL if ac or av == 0
*/
char *argstostr(int ac, char **av)
{
int total_len = 0;
int i, j;
char *resu... | 6 |
gauravloj/geerLaboratory | e4a8e26 | c/nwtworking/01-gethostdetails.c | C | www.github.com/gauravloj/geerLaboratory/tree/main/c/nwtworking/01-gethostdetails.c | https://raw.githubusercontent.com/gauravloj/geerLaboratory/e4a8e26/c/nwtworking/01-gethostdetails.c | gauravloj/geerLaboratory e4a8e26 c/nwtworking/01-gethostdetails.c | true | 200 | 3,503 | #include <arpa/inet.h>
#include <ifaddrs.h>
#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <unistd.h>
void gethostname_self() {
char host[BUFSIZ];
int r;
/* check this machine */
r = gethostname(host, BUFSIZ);
if (r == -1) {
fprintf(stderr,... | 2 |
omkar5432/PPA | f89c47c | C Lang/FunctionDemo.c | C | www.github.com/omkar5432/PPA/tree/main/C Lang/FunctionDemo.c | https://raw.githubusercontent.com/omkar5432/PPA/f89c47c/C%20Lang/FunctionDemo.c | omkar5432/PPA f89c47c C Lang/FunctionDemo.c | true | 200 | 291 | #include<stdio.h>
int Addition(int x,int y)
{
int Ans=0;
Ans=x+y;
return Ans;
}
int main()
{
int a=0,b=0,c=0;
printf("Enter a: \n");
scanf("%d",&a);
printf("Enter b: \n");
scanf("%d",&b);
c=Addition(a,b);
printf("Addition is: %d\n",c);
return 0;
} | 0 |
siemens-mobile-hacks/elfloader3-elfs-archive | 69269d5 | BalletMini/display_utils.c | C | www.github.com/siemens-mobile-hacks/elfloader3-elfs-archive/tree/main/BalletMini/display_utils.c | https://raw.githubusercontent.com/siemens-mobile-hacks/elfloader3-elfs-archive/69269d5/BalletMini/display_utils.c | siemens-mobile-hacks/elfloader3-elfs-archive 69269d5 BalletMini/display_utils.c | true | 200 | 44,471 | #include <swilib.h>
#include <stdlib.h>
#include "view.h"
#include "display_utils.h"
#include "siemens_unicode.h"
#include "string_works.h"
#include "rect_patcher.h"
#include "main.h"
#include "file_works.h"
#include "urlstack.h"
#include "lang.h"
extern int maincsm_id;
extern const int scr_shift;
ext... | 4 |
ahmedemam777/alx-low_level_programming | f039ad9 | 0x0A-argc_argv/0-whatsmyname.c | C | www.github.com/ahmedemam777/alx-low_level_programming/tree/main/0x0A-argc_argv/0-whatsmyname.c | https://raw.githubusercontent.com/ahmedemam777/alx-low_level_programming/f039ad9/0x0A-argc_argv/0-whatsmyname.c | ahmedemam777/alx-low_level_programming f039ad9 0x0A-argc_argv/0-whatsmyname.c | true | 200 | 223 | #include <stdio.h>
/**
* main - print its name followed by new line
* @argc: argument count
* @argv: arguments
* Return: 0 always
*/
int main(int argc, char **argv)
{
(void)argc;
printf("%s\n", argv[0]);
return (0);
}
| 7 |
pavand345/MAY | f7250f3 | prime_number_vth_min_max.c | C | www.github.com/pavand345/MAY/tree/main/prime_number_vth_min_max.c | https://raw.githubusercontent.com/pavand345/MAY/f7250f3/prime_number_vth_min_max.c | pavand345/MAY f7250f3 prime_number_vth_min_max.c | true | 200 | 460 | #include<stdio.h>
int prime(int,int);
int main()
{
int min,max;
int (*fp)(int,int)=prime;
printf("Enter the min number : ");
scanf("%d",&min);
printf("Enter the max number : ");
scanf("%d",&max);
fp(min,max);
return 0;
}
int prime(int min,int max)
{
printf("The prime numbers are : ");
int i,cnt=0;
for(min;mi... | 0 |
luizamarinho/aulas-linguagem-c | a9179ec | exercicio-1.1.c | C | www.github.com/luizamarinho/aulas-linguagem-c/tree/main/exercicio-1.1.c | https://raw.githubusercontent.com/luizamarinho/aulas-linguagem-c/a9179ec/exercicio-1.1.c | luizamarinho/aulas-linguagem-c a9179ec exercicio-1.1.c | true | 200 | 899 | // Faça um programa que preencha um vetor com nove números
// inteiros, calcule e mostre os números primos e suas
// respectivas posições.
#include <stdio.h>
// sintaxe:
// #define <FIND> <REPLACE>
#define TAMANHO 9
int ehprimo(int numero)
{
if (numero == 1)
{
return 0;
}
for (int i = 2; i < ... | 4 |
NishthaLath/DataStructures-2023 | d177fea | Final/IterativeInOrder.c | C | www.github.com/NishthaLath/DataStructures-2023/tree/main/Final/IterativeInOrder.c | https://raw.githubusercontent.com/NishthaLath/DataStructures-2023/d177fea/Final/IterativeInOrder.c | NishthaLath/DataStructures-2023 d177fea Final/IterativeInOrder.c | true | 200 | 1,772 | #include <stdio.h>
#include <stdlib.h>
#define MAX_STACK_SIZE 100
typedef struct node {
int data;
struct node *leftChild, *rightChild;
} node;
typedef node* treePointer;
// Function prototypes
void push(treePointer stack[], int *top, treePointer item);
treePointer pop(treePointer stack[], int *top);
treePoi... | 7 |
kuangyufei/kernel_liteos_a_note | 6390d93 | fs/proc/os_adapt/proc_init.c | C | www.github.com/kuangyufei/kernel_liteos_a_note/tree/main/fs/proc/os_adapt/proc_init.c | https://raw.githubusercontent.com/kuangyufei/kernel_liteos_a_note/6390d93/fs/proc/os_adapt/proc_init.c | kuangyufei/kernel_liteos_a_note 6390d93 fs/proc/os_adapt/proc_init.c | true | 200 | 3,026 | /*
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 1. Redist... | 2 |
sertacsatiroglu/Finding-Prime-Numbers | 943441b | queue.c | C | www.github.com/sertacsatiroglu/Finding-Prime-Numbers/tree/main/queue.c | https://raw.githubusercontent.com/sertacsatiroglu/Finding-Prime-Numbers/943441b/queue.c | sertacsatiroglu/Finding-Prime-Numbers 943441b queue.c | true | 200 | 2,684 | #include <stdlib.h>
#include <pthread.h>
#include "queue.h"
void QueueInitialize(Queue *queue, int maxsize, int lower_bound, int upper_bound, int num_numbers, int generation_rate) {
queue->array = (int *)malloc(maxsize * sizeof(int)); // this is for dynamically allocating memory, sizeof is used to be hold enough m... | 0 |
SUJANSSTHA/C-Project | a20d33c | StackApp.c | C | www.github.com/SUJANSSTHA/C-Project/tree/main/StackApp.c | https://raw.githubusercontent.com/SUJANSSTHA/C-Project/a20d33c/StackApp.c | SUJANSSTHA/C-Project a20d33c StackApp.c | true | 200 | 1,392 | // DSA-2079
// Third Sem
// Stack ApplicationMaterial details
// Stack Application
// Chandra Prasad Acharya
// •
// Aug 22
// EXPRESSI.C
// Text
// Class comments
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
#include<string.h>
#define MAX 100
struct stack
{
char item[MAX];
int tos;
};
void push(struc... | 4 |
tim-balloon/TIMflight | c70a421 | mcp/housekeeping/therm_heater.c | C | www.github.com/tim-balloon/TIMflight/tree/main/mcp/housekeeping/therm_heater.c | https://raw.githubusercontent.com/tim-balloon/TIMflight/c70a421/mcp/housekeeping/therm_heater.c | tim-balloon/TIMflight c70a421 mcp/housekeeping/therm_heater.c | true | 200 | 2,200 | /*
* therm_heater.c:
*
* This software is copyright (C) 2013-2014 Seth Hillbrand
*
* This file is part of mcp, created for the BLASTPol Project.
*
* mcp 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 Software Foundatio... | 7 |
saim1sh/Beecrowd | a5781cd | 1009.c | C | www.github.com/saim1sh/Beecrowd/tree/main/1009.c | https://raw.githubusercontent.com/saim1sh/Beecrowd/a5781cd/1009.c | saim1sh/Beecrowd a5781cd 1009.c | true | 200 | 170 | #include<stdio.h>
int main()
{
double s,v,t;
char name;
scanf("%s %lf %lf",&name,&s,&v);
t=s+v*.15;
printf("TOTAL = R$ %.2lf\n",t);
return 0;
}
| 2 |
Youssef-Ehab77/ITI2022 | f5b7ab6 | 2. Introduction to programming in C/Day 4 C programming Cont/Day 4 Tasks/Create_String_CharbyChar/main.c | C | www.github.com/Youssef-Ehab77/ITI2022/tree/main/2. Introduction to programming in C/Day 4 C programming Cont/Day 4 Tasks/Create_String_CharbyChar/main.c | https://raw.githubusercontent.com/Youssef-Ehab77/ITI2022/f5b7ab6/2.%20Introduction%20to%20programming%20in%20C/Day%204%20C%20programming%20Cont/Day%204%20Tasks/Create_String_CharbyChar/main.c | Youssef-Ehab77/ITI2022 f5b7ab6 2. Introduction to programming in C/Day 4 C programming Cont/Day 4 Tasks/Create_String_CharbyChar/main.c | true | 200 | 386 | #include <stdio.h>
#include <stdlib.h>
#define Enter 0x0D
int main()
{
char name[20];
printf("Please Enter Your Name : ");
gets(name);
printf("Welcome ");
puts(name);
return 0;
}
/*
char name[10];
char ch;
int index = 0;
while((ch = getchar()) != '\n... | 0 |
kpatsakis/primevul9 | de9fd13 | 188736.c | C | www.github.com/kpatsakis/primevul9/tree/main/188736.c | https://raw.githubusercontent.com/kpatsakis/primevul9/de9fd13/188736.c | kpatsakis/primevul9 de9fd13 188736.c | true | 200 | 1,234 | static void i40e_vsi_disable_irq(struct i40e_vsi *vsi)
{
struct i40e_pf *pf = vsi->back;
struct i40e_hw *hw = &pf->hw;
int base = vsi->base_vector;
int i;
/* disable interrupt causation from each queue */
for (i = 0; i < vsi->num_queue_pairs; i++) {
u32 val;
val = rd32(hw, I40E_QINT_TQCTL(vsi->tx_rings[i]->... | 7 |
JC-Rhino-Cheng/Linear-Algebra-HWs | 74cc827 | HW1/老師發的原始檔案/mmm.c | C | www.github.com/JC-Rhino-Cheng/Linear-Algebra-HWs/tree/main/HW1/老師發的原始檔案/mmm.c | https://raw.githubusercontent.com/JC-Rhino-Cheng/Linear-Algebra-HWs/74cc827/HW1/%E8%80%81%E5%B8%AB%E7%99%BC%E7%9A%84%E5%8E%9F%E5%A7%8B%E6%AA%94%E6%A1%88/mmm.c | JC-Rhino-Cheng/Linear-Algebra-HWs 74cc827 HW1/老師發的原始檔案/mmm.c | true | 200 | 605 | #include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include "mmm.h"
float A[SIZE][SIZE], B[SIZE][SIZE], C[SIZE][SIZE], D[SIZE][SIZE];
int main() {
for (auto i = 0; i < SIZE; i++) {
for (auto j = 0; j < SIZE; j++) {
A[i][j] = rand() % 10;
B[i][j] = rand() % 10;
}
}
clock_t t1 = clock... | 4 |
hozlucas28/C-Practical-Work-2024 | 03a35c6 | src/structs.h | C | www.github.com/hozlucas28/C-Practical-Work-2024/tree/main/src/structs.h | https://raw.githubusercontent.com/hozlucas28/C-Practical-Work-2024/03a35c6/src/structs.h | hozlucas28/C-Practical-Work-2024 03a35c6 src/structs.h | true | 200 | 846 |
#ifndef SRC_STRUCTS_H_INCLUDED
#define SRC_STRUCTS_H_INCLUDED
/**
* @struct TMainArguments
* @brief Represents the main arguments of the application.
*
* This structure holds the main configuration parameters for the application.
*/
typedef struct {
int dashboardRows; /** Number of rows in the dashboard... | 0 |
MikhailButs/FT2SXR | 57a12ee | insys/WDMLIBS/linux/memalloc.c | C | www.github.com/MikhailButs/FT2SXR/tree/main/insys/WDMLIBS/linux/memalloc.c | https://raw.githubusercontent.com/MikhailButs/FT2SXR/57a12ee/insys/WDMLIBS/linux/memalloc.c | MikhailButs/FT2SXR 57a12ee insys/WDMLIBS/linux/memalloc.c | true | 200 | 16,585 | //=********************************************************
// MemAlloc.cpp - Class TMemAlloc Definition
//
// (C) Copyright Ekkore 2003
//
// Created:
// 10.04.2003 by Ekkore
// Modified:
//
//=********************************************************
#include "MemAlloc.h"
//=*************** TMemAlloc::TMemAlloc *... | 7 |
Ricco-Shubham/shortingfusion | 447f945 | shorts.c | C | www.github.com/Ricco-Shubham/shortingfusion/tree/main/shorts.c | https://raw.githubusercontent.com/Ricco-Shubham/shortingfusion/447f945/shorts.c | Ricco-Shubham/shortingfusion 447f945 shorts.c | true | 200 | 1,013 | #include <stdio.h>
#include <stdlib.h>
#include <time.h>
// A function to implement insertion sort
void insertionSort(int array[], int size) {
int x=1;
printf("\nShorting By Bubble Sort:- \n");
int z=0;
for (int step = 1; step < size; step++) {
int key = array[step];
int j = step - 1;
... | 4 |
varun-al/Data-Structure-progamming-Assignment | 463ca08 | programs/26.c | C | www.github.com/varun-al/Data-Structure-progamming-Assignment/tree/main/programs/26.c | https://raw.githubusercontent.com/varun-al/Data-Structure-progamming-Assignment/463ca08/programs/26.c | varun-al/Data-Structure-progamming-Assignment 463ca08 programs/26.c | true | 200 | 1,570 | //Write a program in C to search an existing element in a singly linked list.
#include <stdio.h>
#include <stdlib.h>
struct Node {
int data;
struct Node *next;
};
struct Node *head; // Global variable, head of linked list
// Function to create a new node
struct Node *createNode(int data) {
struct Node *n... | 2 |
jojohimawan/lecture-c-dsa | f8efa18 | 1.1/prakt1_pegawai.c | C | www.github.com/jojohimawan/lecture-c-dsa/tree/main/1.1/prakt1_pegawai.c | https://raw.githubusercontent.com/jojohimawan/lecture-c-dsa/f8efa18/1.1/prakt1_pegawai.c | jojohimawan/lecture-c-dsa f8efa18 1.1/prakt1_pegawai.c | true | 200 | 2,083 | #include <stdio.h>
#include <string.h>
// deklarasi variabel struct
typedef struct date {
int day, month, year
} tanggal;
typedef struct employee {
tanggal lahir;
char nama[30], k, jk[12];
int id, gaji, pegawai
} pegawai;
// global variable untuk batasan array
int jumlah_pegawai;
// prototype fungsi... | 0 |
abduljaneeb/data-structure | f152560 | merge sort.c | C | www.github.com/abduljaneeb/data-structure/tree/main/merge sort.c | https://raw.githubusercontent.com/abduljaneeb/data-structure/f152560/merge%20sort.c | abduljaneeb/data-structure f152560 merge sort.c | true | 200 | 1,442 | #include <stdio.h>
#define MAX 8
int arr[MAX];
void merge(int low, int mid, int high) {
int i, j, k;
int n1 = mid - low + 1;
int n2 = high - mid;
int L[n1], R[n2];
// Copy data to temporary arrays L[] and R[]
for (i = 0; i < n1; i++)
L[i] = arr[low + i];
for (j = 0; ... | 4 |
mohammed160160/alx-low_level_programming | 0eb3796 | 0x01-variables_if_else_while/101-print_comb4.c | C | www.github.com/mohammed160160/alx-low_level_programming/tree/main/0x01-variables_if_else_while/101-print_comb4.c | https://raw.githubusercontent.com/mohammed160160/alx-low_level_programming/0eb3796/0x01-variables_if_else_while/101-print_comb4.c | mohammed160160/alx-low_level_programming 0eb3796 0x01-variables_if_else_while/101-print_comb4.c | true | 200 | 504 | #include <stdio.h>
/**
* main - writing unique 3 digits
* Description - creating a program that write each unique 3
* digit values
* Return: 0
*/
int main(void)
{
int x;
int y;
int z;
x = 0;
while (x < 8)
{
y = x + 1;
while (y < 9)
{
z = y + 1;
while (z < 10)
{
if (x != y && x != z && y != z)
{
pu... | 7 |
Kevin-M254/alx-low_level_programming | 3e95974 | 0x05-pointers_arrays_strings/8-main.c | C | www.github.com/Kevin-M254/alx-low_level_programming/tree/main/0x05-pointers_arrays_strings/8-main.c | https://raw.githubusercontent.com/Kevin-M254/alx-low_level_programming/3e95974/0x05-pointers_arrays_strings/8-main.c | Kevin-M254/alx-low_level_programming 3e95974 0x05-pointers_arrays_strings/8-main.c | true | 200 | 249 | #include "main.h"
/**
* main - check code for 8-print_array
*
* Return: always 0.
*/
int main(void)
{
int array[5];
array[0] = 98;
array[1] = 402;
array[2] = -198;
array[3] = 298;
array[4] = -1024;
print_array(array, 5);
return (0);
}
| 2 |
kendrion/cds-rts-econo | 4810b61 | BuildUtils/msys/bin/sources/m4/m4-1.4.13/lib/sigaction.c | C | www.github.com/kendrion/cds-rts-econo/tree/main/BuildUtils/msys/bin/sources/m4/m4-1.4.13/lib/sigaction.c | https://raw.githubusercontent.com/kendrion/cds-rts-econo/4810b61/BuildUtils/msys/bin/sources/m4/m4-1.4.13/lib/sigaction.c | kendrion/cds-rts-econo 4810b61 BuildUtils/msys/bin/sources/m4/m4-1.4.13/lib/sigaction.c | true | 200 | 7,441 | /* POSIX compatible signal blocking.
Copyright (C) 2008 Free Software Foundation, Inc.
Written by Eric Blake <ebb9@byu.net>, 2008.
This program 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 Software Foundation;... | 0 |
liaochunping/2022_spring_DSA | 81f38bc | homework4/test/test/main.c | C | www.github.com/liaochunping/2022_spring_DSA/tree/main/homework4/test/test/main.c | https://raw.githubusercontent.com/liaochunping/2022_spring_DSA/81f38bc/homework4/test/test/main.c | liaochunping/2022_spring_DSA 81f38bc homework4/test/test/main.c | true | 200 | 3,309 | #include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
typedef struct operation{
char o;
int int1 ;
int int2 ;
} Operation;
Operation op[1000001];
typedef struct disjointSet{
int parent;
int size;
} DisjointSet;
DisjointSet ds[1000001];
bool set[1000001] = {}... | 4 |
MayowaDeveloper2/alx-low_level_programming | 16e06fb | 0x13-more_singly_linked_lists/0-print_listint.c | C | www.github.com/MayowaDeveloper2/alx-low_level_programming/tree/main/0x13-more_singly_linked_lists/0-print_listint.c | https://raw.githubusercontent.com/MayowaDeveloper2/alx-low_level_programming/16e06fb/0x13-more_singly_linked_lists/0-print_listint.c | MayowaDeveloper2/alx-low_level_programming 16e06fb 0x13-more_singly_linked_lists/0-print_listint.c | true | 200 | 301 | #include "lists.h"
/**
* print_listint - Prints all the elements of a list
* @h: pointer to the head of the list
* Return: The number of nodes in the list
*/
size_t print_listint(const listint_t *h)
{
size_t i = 0;
while (h)
{
printf("%d\n", h->n);
h = h->next;
i++;
}
return (i);
}
| 7 |
JoaquinBN/Digital_Systems | 0f51722 | 2023.05.21-SDM-2223-P2-FB-joaquin.bressan-pau.coderch/PHASE_2B.X/Audio.c | C | www.github.com/JoaquinBN/Digital_Systems/tree/main/2023.05.21-SDM-2223-P2-FB-joaquin.bressan-pau.coderch/PHASE_2B.X/Audio.c | https://raw.githubusercontent.com/JoaquinBN/Digital_Systems/0f51722/2023.05.21-SDM-2223-P2-FB-joaquin.bressan-pau.coderch/PHASE_2B.X/Audio.c | JoaquinBN/Digital_Systems 0f51722 2023.05.21-SDM-2223-P2-FB-joaquin.bressan-pau.coderch/PHASE_2B.X/Audio.c | true | 200 | 913 | #include <xc.h>
#include "Audio.h"
static char pTime;
static char state = 0;
static char period;
static char songTime;
void initAudio(void) {
TRISCbits.TRISC2 = 0;
TI_NewTimer(&pTime);
TI_NewTimer(&songTime);
}
void audioLoop(void){
switch(state){
case 0:
//song idle off
... | 2 |
CosmoLucs/IF677_Projeto_Threads | fd42782 | Q3/pcNovo.c | C | www.github.com/CosmoLucs/IF677_Projeto_Threads/tree/main/Q3/pcNovo.c | https://raw.githubusercontent.com/CosmoLucs/IF677_Projeto_Threads/fd42782/Q3/pcNovo.c | CosmoLucs/IF677_Projeto_Threads fd42782 Q3/pcNovo.c | true | 200 | 11,325 | #include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
#include <pthread.h>
#define PEDIDOS_SIZE 3
#define MONEY_INICIAL 5
#define MAX_ARQ_NAME 50
typedef struct node Node;
typedef struct Pedidos{
int id;
int money;
int OP;
bool valid;
} Pedidos;
typedef struct node{... | 0 |
Piusbassey/alx-low_level_programming | da00ba5 | 0x07-pointers_arrays_strings/5-strstr.c | C | www.github.com/Piusbassey/alx-low_level_programming/tree/main/0x07-pointers_arrays_strings/5-strstr.c | https://raw.githubusercontent.com/Piusbassey/alx-low_level_programming/da00ba5/0x07-pointers_arrays_strings/5-strstr.c | Piusbassey/alx-low_level_programming da00ba5 0x07-pointers_arrays_strings/5-strstr.c | true | 200 | 570 | #include "main.h"
#include <stddef.h>
/**
* _strstr - Locates a substring within a string
* @haystack: Pointer to the string to search in
* @needle: Pointer to the substring to search for
*
* Return: Pointer to the beginning of the located substring.
*/
char *_strstr(char *haystack, char *needle)
{
while (*hays... | 7 |
kpatsakis/primevul4 | 2e77de6 | 52241.c | C | www.github.com/kpatsakis/primevul4/tree/main/52241.c | https://raw.githubusercontent.com/kpatsakis/primevul4/2e77de6/52241.c | kpatsakis/primevul4 2e77de6 52241.c | true | 200 | 614 | process_global_unset(struct archive_read *a,
struct mtree_option **global, const char *line)
{
const char *next;
size_t len;
line += 6;
if (strchr(line, '=') != NULL) {
archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
"/unset shall not contain `='");
return ARCHIVE_FATAL;
}
for (;;) {
next = l... | 4 |
Tonyy107/alx-low_level_programming | 5417a05 | 0x01-variables_if_else_while/100-print_comb3.c | C | www.github.com/Tonyy107/alx-low_level_programming/tree/main/0x01-variables_if_else_while/100-print_comb3.c | https://raw.githubusercontent.com/Tonyy107/alx-low_level_programming/5417a05/0x01-variables_if_else_while/100-print_comb3.c | Tonyy107/alx-low_level_programming 5417a05 0x01-variables_if_else_while/100-print_comb3.c | true | 200 | 298 | #include <stdio.h>
/**
* main - entry point
* Return: 0
*/
int main(void)
{
int x, y;
for (x = 48 ; x <= 57 ; x++)
{
for (y = 49 + (x - 48) ; y <= 57 ; y++)
{
putchar(x);
putchar(y);
if (x != 56)
{
putchar(44);
putchar(32);
}
}
}
putchar('\n');
return (0);
}
| 2 |
Wamboe/alx-low_level_programming | 7ffb508 | 0x01-variables_if_else_while/7-print_tebahpla.c | C | www.github.com/Wamboe/alx-low_level_programming/tree/main/0x01-variables_if_else_while/7-print_tebahpla.c | https://raw.githubusercontent.com/Wamboe/alx-low_level_programming/7ffb508/0x01-variables_if_else_while/7-print_tebahpla.c | Wamboe/alx-low_level_programming 7ffb508 0x01-variables_if_else_while/7-print_tebahpla.c | true | 200 | 233 | #include <stdio.h>
/**
* main - prints letter of the alphabet
*
* Return: always 0 for success
*/
int main(void)
{
char letter = 'z';
while (letter >= 'a')
{
putchar(letter);
letter--;
}
putchar('\n');
return (0);
}
| 0 |
TheBetterDark/42-Philosophers | 1fc7116 | src/simulation.c | C | www.github.com/TheBetterDark/42-Philosophers/tree/main/src/simulation.c | https://raw.githubusercontent.com/TheBetterDark/42-Philosophers/1fc7116/src/simulation.c | TheBetterDark/42-Philosophers 1fc7116 src/simulation.c | true | 200 | 2,519 | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* simulation.c :+: :+: :+: ... | 7 |
halina20011/RemoteMarlinControl | 252e1be | Code/main/server.h | C | www.github.com/halina20011/RemoteMarlinControl/tree/main/Code/main/server.h | https://raw.githubusercontent.com/halina20011/RemoteMarlinControl/252e1be/Code/main/server.h | halina20011/RemoteMarlinControl 252e1be Code/main/server.h | true | 200 | 589 | #ifndef SERVER
#define SERVER
#include "freertos/FreeRTOS.h"
#include "freertos/timers.h"
#include "freertos/event_groups.h"
#include <esp_http_server.h>
#include "esp_system.h"
#include "esp_netif.h"
#include "esp_event.h"
#include "esp_wifi.h"
static const httpd_uri_t indexUri = {
.uri = "/",
.method = HTT... | 4 |
prabal2011singh/Software_System | 6cd1d04 | SS_lab_1/test1.c | C | www.github.com/prabal2011singh/Software_System/tree/main/SS_lab_1/test1.c | https://raw.githubusercontent.com/prabal2011singh/Software_System/6cd1d04/SS_lab_1/test1.c | prabal2011singh/Software_System 6cd1d04 SS_lab_1/test1.c | true | 200 | 383 | #include<stdio.h>
#include<stdlib.h>
#include<unistd.h>
#include<time.h>
#include<sys/stat.h>
int main()
{
if(!fork())
{
setsid();
chdir("/");
umask(0);
while(1)
{
sleep(4);
printf("child pid : %d\n", getpid());
printf("Deamon process ... | 2 |
avanoc/CS50x | e393e16 | CS50 - Week 2/array.c | C | www.github.com/avanoc/CS50x/tree/main/CS50 - Week 2/array.c | https://raw.githubusercontent.com/avanoc/CS50x/e393e16/CS50%20-%20Week%202/array.c | avanoc/CS50x e393e16 CS50 - Week 2/array.c | true | 200 | 816 | #include <cs50.h>
#include <stdio.h>
bool array[] = {1, 2, 3} // I'm creating an boolean array, called "array" that includes the arguments "1", "3" and "3". I don't need in this case, to include how many arguments there will be.
bool array[3] // an array itself is NOT a variable. To duplicate an array, I have to use ... | 5 |
DeviousCardi/BTP | 720b738 | deepfix_data/prob251/correct/prog10033-user530.c | C | www.github.com/DeviousCardi/BTP/tree/main/deepfix_data/prob251/correct/prog10033-user530.c | https://raw.githubusercontent.com/DeviousCardi/BTP/720b738/deepfix_data/prob251/correct/prog10033-user530.c | DeviousCardi/BTP 720b738 deepfix_data/prob251/correct/prog10033-user530.c | true | 200 | 505 | #include <stdio.h>
#include <stdlib.h>
long getways(int x, int m) {
long count=0;
if(x==0){
return 1; }
switch(m) {
case 3:if((x/5)>0)
count=count+getways(x-5,3);
case 2:if((x/3)>0);
count=count+getways(x-3,2);
case 1:count=count+1;
... | 7 |
quantumscribe/CS50 | 8d4c42a | Lec-3/recursion.c | C | www.github.com/quantumscribe/CS50/tree/main/Lec-3/recursion.c | https://raw.githubusercontent.com/quantumscribe/CS50/8d4c42a/Lec-3/recursion.c | quantumscribe/CS50 8d4c42a Lec-3/recursion.c | true | 200 | 645 | // Program to draw a pyramid pattern using recursion
#include <stdio.h>
// Function prototype
void draw(int n);
int main()
{
int n;
// Prompt user for the number of rows
printf("Enter the number of rows: ");
scanf("%d", &n);
// Call the draw function
draw(n);
return 0;
}
// Recursive function to draw the pyr... | 0 |
TydaJL/LLMRPG | 0837897 | result/0802-codegen-2_100/file_0106.c | C | www.github.com/TydaJL/LLMRPG/tree/main/result/0802-codegen-2_100/file_0106.c | https://raw.githubusercontent.com/TydaJL/LLMRPG/0837897/result/0802-codegen-2_100/file_0106.c | TydaJL/LLMRPG 0837897 result/0802-codegen-2_100/file_0106.c | true | 200 | 231 |
#include <stdio.h>
int a() {
int x;
x = 5;
return x;
}
void b() {
printf("Function b called\n");
}
int main() {
int result = a();
printf("Result from function a: %d\n", result);
b();
return 0;
}
| 1 |
Guidomo10/alx-low_level_programming | 47d3a1b | 0x0B-malloc_free/3-alloc_grid.c | C | www.github.com/Guidomo10/alx-low_level_programming/tree/main/0x0B-malloc_free/3-alloc_grid.c | https://raw.githubusercontent.com/Guidomo10/alx-low_level_programming/47d3a1b/0x0B-malloc_free/3-alloc_grid.c | Guidomo10/alx-low_level_programming 47d3a1b 0x0B-malloc_free/3-alloc_grid.c | true | 200 | 598 | #include "main.h"
/**
* alloc_grid - returns a pointer to a 2 dimensional array of integers.
* @width: integger.
* @height: integger.
*
* Return: Null on failure, and 2 dimensional arrays.
*/
int **alloc_grid(int width, int height)
{
int i, j;
int **a;
if (width <= 0 || height <= 0)
return (NULL);
a = (int **)m... | 6 |
soccerthomas/data-structures-1 | 8878489 | LinkedList2.c | C | www.github.com/soccerthomas/data-structures-1/tree/main/LinkedList2.c | https://raw.githubusercontent.com/soccerthomas/data-structures-1/8878489/LinkedList2.c | soccerthomas/data-structures-1 8878489 LinkedList2.c | true | 200 | 951 | #include <stdio.h>
#include <stdlib.h>
//Thomas Lavadinho
//10/28/23
int main(){
struct Node* head = NULL;
insertFront(&head,3);
insertFront(&head,1);
insertFront(&head,2);
printf("Doubly Linked List:");
printList(head);
return 0;
}
struct Node {
int data;
struct Node* prev;
stru... | 4 |
miguelalonso22/sistemas-embebidos | e4eb062 | hello_world_cuadratica.c | C | www.github.com/miguelalonso22/sistemas-embebidos/tree/main/hello_world_cuadratica.c | https://raw.githubusercontent.com/miguelalonso22/sistemas-embebidos/e4eb062/hello_world_cuadratica.c | miguelalonso22/sistemas-embebidos e4eb062 hello_world_cuadratica.c | true | 200 | 1,229 | #include <stdio.h>
#include <ctype.h>
#include <math.h>
#include <stdlib.h>
void cuadratica(float a, float b, float c, double salida[2])
{
double discriminante, raiz1, raiz2;
discriminante = b*b - 4*a*c;
// printf("discriminante: %f\n", discriminante);
if (discriminante < 0){
printf("No existe... | 3 |
Seife1/alx-low_level_programming | d9444d3 | 0x07-pointers_arrays_strings/0-memset.c | C | www.github.com/Seife1/alx-low_level_programming/tree/main/0x07-pointers_arrays_strings/0-memset.c | https://raw.githubusercontent.com/Seife1/alx-low_level_programming/d9444d3/0x07-pointers_arrays_strings/0-memset.c | Seife1/alx-low_level_programming d9444d3 0x07-pointers_arrays_strings/0-memset.c | true | 200 | 256 | #include "main.h"
/**
* _memset - fills memory with constant byte
* @s: pointer
* @n: integer
* @b: char
* Return: char
*/
char *_memset(char *s, char b, unsigned int n)
{
unsigned int i;
for (i = 0; i < n; i++)
{
s[i] = b;
}
return (s);
}
| 2 |
luizfgontijo/projetos-em-C | f1cbe84 | lista 12/exercício 1.c | C | www.github.com/luizfgontijo/projetos-em-C/tree/main/lista 12/exercício 1.c | https://raw.githubusercontent.com/luizfgontijo/projetos-em-C/f1cbe84/lista%2012/exerc%C3%ADcio%201.c | luizfgontijo/projetos-em-C f1cbe84 lista 12/exercício 1.c | true | 200 | 267 | #include <stdio.h>
#include <stdlib.h>
int main ()
{
int n,g;
printf ("Digite N: ");
scanf ("%d",&n);
g=programa(n);
return 0;
}
int programa (int max)
{
int i;
for (i=1;i<=max;i=i+4)
{
printf ("\n%d",i);
}
return i;
}
| 7 |
gautamsavaliya/node_5 | ce4ad31 | fwp.c | C | www.github.com/gautamsavaliya/node_5/tree/main/fwp.c | https://raw.githubusercontent.com/gautamsavaliya/node_5/ce4ad31/fwp.c | gautamsavaliya/node_5 ce4ad31 fwp.c | true | 200 | 195 | #include<stdio.h>
void dosum(int a,int b)
{
printf("\n a+b :%d",a+b);
}
int main()
{
int a,b;
printf("\n enter a:");
scanf("%d",&a);
printf("\n enter b:");
scanf("%d",&b);
dosum(a,b);
} | 5 |
Taufique-07/Data-Structure | 63513ea | Data structure lab 21 (06-05-2024).c | C | www.github.com/Taufique-07/Data-Structure/tree/main/Data structure lab 21 (06-05-2024).c | https://raw.githubusercontent.com/Taufique-07/Data-Structure/63513ea/Data%20structure%20lab%2021%20%2806-05-2024%29.c | Taufique-07/Data-Structure 63513ea Data structure lab 21 (06-05-2024).c | true | 200 | 2,074 | #include<stdio.h>
#include<stdlib.h>
struct node
{
int data;
struct node* left;
struct node* right;
};
struct node* create(int data)
{
struct node*newnode;
newnode=(struct node*)malloc(sizeof(struct node));
newnode->data=data;
newnode->left=NULL;
newnode->right=NULL;
return newno... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.