blob_id
large_string
language
large_string
repo_name
large_string
path
large_string
src_encoding
large_string
length_bytes
int64
score
float64
int_score
int64
detected_licenses
large list
license_type
large_string
text
string
download_success
bool
27e3c3d60340db82e522c8ea3652fcfd208d499b
C
RetroBSD/retrobsd
/src/cmd/picoc/type.c
UTF-8
19,897
2.953125
3
[ "BSD-3-Clause" ]
permissive
/* picoc data type module. This manages a tree of data types and has facilities * for parsing data types. */ #include "interpreter.h" /* some basic types */ struct ValueType UberType; struct ValueType IntType; struct ValueType ShortType; struct ValueType CharType; struct ValueType LongType; struct ValueType Unsigne...
true
72c5efbe8ac55213af077319cc9c9eaa05c1f91d
C
ChrisFloresM/C
/Lenguaje C/Ejercicios_Piensa en C/Capítulo_5/PS5_11.c
UTF-8
746
3.65625
4
[]
no_license
#include <stdio.h> int I; int perfecto(long); void imprime(long *); void main() { long PER[4], J = 6; int eval; for (I = 0; I < 4; I++) { eval = 0; while (eval == 0) { eval = perfecto(J); J++; } PER[I] = J-1; } printf("\nLos numer...
true
fca348e40f9aaf0aa07f0af499e5ddf7a69c0f1d
C
NguyenXuanAnhThu/1000
/Tuần 1/Bai31kiemtrasonguyento.c
UTF-8
563
3.125
3
[]
no_license
#include <stdio.h> #include <conio.h> void main() { int a,i,dem=0; printf("nhap so a\n"); scanf("%d",&a); if (a<2) { printf("a khong phai la so nguyen to\n"); } else if (a==2) { printf("a=2 la mot so nguyen to\n"); } else fo...
true
7d0601fb746b73b5dda64c667a9b2ebd057c24e1
C
HoYaStudy/C_Study
/error_handling/src/test.c
UTF-8
573
3.015625
3
[]
no_license
//--- Include Headers --------------------------------------------------------// #include "error_handling.h" #include "test.h" //--- External Functions -----------------------------------------------------// /** * @brief Returns value that multiplies the two parameters. * It has a multiplication table limit. ...
true
1ca82a33932fa17d88747c9a3d9ccd2ddd92a4a0
C
earthquake/GI-John
/src/mkvcalcproba.c
UTF-8
2,859
2.71875
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #if !defined (_MSC_VER) #include <unistd.h> #else #pragma warning ( disable : 4244 ) #endif #include <string.h> #if defined (__MINGW32__) || defined (_MSC_VER) // Later versions of MSVC can handle %lld but some older // ones can only handle %I64d. Easiest to simply use // %I64d ...
true
d0834c2fd4a6972662cd18c98a395070f0f6209a
C
mhiloca/C_Course
/BeginnersCourse/pointers/dynamicMemoryAllocation/dynamicMemoryAllocation.c
UTF-8
921
3.96875
4
[]
no_license
/* Dynamically allocate memory for a string */ #include <stdio.h> #include <stdlib.h> #include <string.h> int main() { char * str = NULL; char enough; int limit; printf("You are going to enter a text\nBut before we need the limit to this text: "); scanf("%d", &limit); str = (char *) calloc(li...
true
3bf9780a832c30e2c17f081008149391f6f1ad06
C
danielgw/E1118
/xplain-software-framework-1.0/source/include/util.h
UTF-8
10,113
2.515625
3
[]
no_license
/** * \file * * \brief Misc utility functions and definitions * * Copyright (C) 2009 Atmel Corporation. All rights reserved. * * \page License * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistrib...
true
6fa7bbb665eab0be5252ddd3aa717b2cc9d54b07
C
isili/MosquittoSend
/mosquitto_send.c
UTF-8
13,838
3.703125
4
[]
no_license
#include <ctype.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <string.h> #include <stdbool.h> /******************************************************************************* LINKED LIST /* @desc: structure to handle the list of commands * @params: key ...
true
e9ccb56de47f0b846160d9ef3fd1455da718b108
C
Meleknur00/homework
/extra02/question6.c
UTF-8
483
4.1875
4
[]
no_license
// 6. Write a C program to read the value of an integer m and display the value of n is 1 when m is larger than 0, // 0 when m is 0 and -1 when m is less than 0. // Test Data: -5 // Expected Output: // The value of n = -1 #include <stdio.h> int main() { int m,n; printf("Enter the value of m: "); scanf("%d...
true
dbd1ddb1def1819d83f48b1bb3475dc8afa923ba
C
durians/durians
/DataStruct/MOOC-DataStruct2015spring/03-树1.ListLeaves(25).c
UTF-8
2,122
3.65625
4
[]
no_license
//http://www.patest.cn/contests/mooc-ds2015spring/03-树1 //题源:训练建树和遍历基本功 //题意:层次遍历输出叶子(list all the leaves in the order of top down, and left to right.) //方法:所给数据parent、child关系明确,不需要动态确定关系,静态链表存储更优。 // 队列实现层次遍历: // 1.Q.enque(root) // 2.while(!Q.empty) // r = Q.deque() // visited(r) // ...
true
0c0d4262e818c6ace9e71097897046ae176fb95a
C
vdsudra/code
/ed/training/strchr.c
UTF-8
256
3.046875
3
[]
no_license
#include<string.h> #include<stdio.h> int main() { char *p; int i; p=strchr("This is my string",'m'); printf("%s\n",p); char s[]="Is it not is so, why is like that is"; p=strtok(s,"is"); while(s!=NULL) { p=strtok(s,"is"); printf("%s\n",s); } }
true
3f28392663cad865c33639c84039048c8981cf62
C
ChangMinPark/rushmore
/optee/core/arch/arm/chacha20/chacha20.c
UTF-8
3,857
2.640625
3
[ "BSD-2-Clause" ]
permissive
/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* Adopted from the public domain code in NaCl by djb. */ #include <string.h> #include <stdio.h> //#include "prt...
true
438910a4691ea7c43df60ce74aaba107baf34c6a
C
isabella232/AnghaBench
/source/postgres/src/backend/storage/file/extr_fd.c_ReadDirExtended.c
UTF-8
1,228
2.609375
3
[]
no_license
#define NULL ((void*)0) typedef unsigned long size_t; // Customize by platform. typedef long intptr_t; typedef unsigned long uintptr_t; typedef long scalar_t__; // Either arithmetic or pointer type. /* By default, we understand bool (as a convenience). */ typedef int bool; #define false 0 #define true 1 /* Forward d...
true
f7595b8e67febe7ba4c2764c5a7b75bc7dda4d13
C
Luncert/poj
/1321/main1.c
UTF-8
1,342
2.578125
3
[]
no_license
#include <iostream> #include <cstdio> #include <cstdlib> #include <cstring> #include <cctype> #include <stack> #include <queue> #include <deque> #include <map> #include <set> #include <vector> #include <cmath> #include <algorithm> #define lson l, m, rt<<1 #define rson m+1, r, rt<<1|1 using namespace std; typedef long l...
true
0ef5de0e125901a2ccc2779123f2d9f9d1955254
C
auyeongwy/kernel_comm
/say_hello/say_hello.c
UTF-8
2,560
3.796875
4
[ "Apache-2.0" ]
permissive
/** @file say_hello.c * Simple test application to read and write to the character device /dev/khello. Used for testing with the khello kernel module. * * Usage: * After loading the kernel module. * To read from the device: "./say_hello read" * To write to the device: ./say_hello write something" * */ #inclu...
true
a1ad0aaa669047887755eab16967ca8539b59366
C
kruthi-mahesh/preparation_till_now
/test ur C skills new/function/44.c
UTF-8
261
2.53125
3
[]
no_license
#include <stdio.h> void f3(); int main(int argc, char const *argv[]) { void f2(); void f1(); int n = 8; f1(); f2(); return 0; } void f1() { printf("f1\n"); f3(4); } void f2() { //f3(3); printf("f2\n"); } void f3(int a){ printf("f3%d\n",a); }
true
3c45630d6a4c1167f0ab8b8ede00fae3d3bb2833
C
aman556/Data-Structures-Visualization
/Data-Structure-Visualization-using-OpenGl-main/header/doublelinkedlist.h
UTF-8
8,211
2.59375
3
[]
no_license
struct dlnode { int info; struct dlnode *rlink; struct dlnode *llink; }; typedef struct dlnode *DLNODE; static int dlcount = 0; DLNODE head; void dldrawstring(float x, float y, char *string) { char *c; glRasterPos2f(x, y); for(c = string; *c != '\0'; c++) { glutBitmapCharacter(...
true
52d6d6c6f83ec36acde94203409051392129e2c2
C
JanWalsh91/malloc
/libmalloc/src/region_manager.c
UTF-8
2,472
2.703125
3
[]
no_license
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* region_manager.c :+: :+: :+: ...
true
e010cd65e45e21acce218e143e7458bc05172100
C
goodwiins/AUI
/CSC 1401/Oct_C/ran.c
UTF-8
727
3.375
3
[]
no_license
#include <stdio.h> int main(void) { int a; printf("number? "); scanf("%d",&a); if (a==1) { printf("Sunday\n"); } else if (a==2) { printf("Monday\n"); } else if (a==3) { printf("Tuesday\n"); ...
true
abacea1d9f950742b61bd1e11016d06810aa0ab4
C
NightBaRron1412/ITI-Embedded-Systems-Course
/Day_01/C/Labs/Lab1.c
UTF-8
242
2.921875
3
[]
no_license
//Libraries including #include <stdio.h> void main (){ //Printing information printf("I'm Amir Shetaia\n" "\nMy birthdate is 1 Oct 2001\n" "\nI Study at Faculty of Engineering\n" "\nMansoura University 2024\n" "\nMy E-mail is \"AShetaia@std.mans.edu.eg\""); }
true
5c636d905cd6881b131cb11a72e5f8b535c3e998
C
remembergf/C-
/进货.c
UTF-8
1,807
3.34375
3
[]
no_license
#include<stdio.h> #include<stdlib.h> #define N 10 struct date { int year; int month; int day; }; struct appliance { char unitname[20]; char telephone[11]; }; struct food { struct date a; }; struct goods { char num[20]; char name[20]; struct date b; int money; int quantity; char ...
true
ad1ec4551e8fa59d020e64fa318d008acaa84d8a
C
peteyluu/42-ft_printf
/srcs/handle_left_just.c
UTF-8
2,731
2.625
3
[]
no_license
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* handle_left_just.c :+: :+: :+: ...
true
5e081c4ab8713b57e54a26c0fb9603247ed885df
C
GMDFr/Phidget-3-3-3
/Phidget22_Spatial_CompassCalibrator_C_Ex_20200417/Spatial_CompassCalibrator_Example/compasscal_lib/compasscal.h
UTF-8
3,833
2.6875
3
[]
no_license
#ifndef _COMPASSCAL_LIB #define _COMPASSCAL_LIB #ifdef __cplusplus extern "C" { #endif /* standard calling convention under Win32 is __stdcall */ #if defined(_WIN32) #define COMPASSCAL_API __stdcall #else #define COMPASSCAL_API #endif /** * Progress report callback funtion. Most of these variables won't concern ...
true
894fdc702682966fe1526248fe13a60a6cf588b5
C
rangaraju29139/c-programs
/inserting into the array.c
UTF-8
418
3.890625
4
[]
no_license
#include<stdio.h> void main(){ int i,size=5,item,pos,a[10],j; printf("enter the elements: "); for(i=0;i<size;i++){ scanf("%d",&a[i]); } printf("enter the item to insert"); scanf("%d",&item); printf("enter the postion to insert"); scanf("%d",&pos); size++; for(j=size;j>=pos;j--){ a[j]=a[j-1]; } a[j]=ite...
true
4a78161242cae114fbde837b8592a7d6e31e5db8
C
vinceMatsui/listen_folder_and_notif_slack
/main.c
UTF-8
3,756
2.625
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <string.h> #include <cjson/cJSON.h> #include <curl/curl.h> #include <dirent.h> #include <errno.h> #include "header.h" #include "functions.c" int main(int argc, char *argv[] ){ int count, i; count = 360; int numOfFiles, oldNum...
true
b6c0ed6edf49e4d993e65fedbaf5b5508db4cf5e
C
snskshn/code_segments
/baseball2.c
UTF-8
695
3.640625
4
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <time.h> #include <string.h> int main() { char answer[4] = {0}; char guess[4] = {0}; // make answer srand(time(NULL)); snprintf(answer, 4, "%03d", rand() % 1000); printf("answer: %s\n", answer); // guess printf("input: "); scanf("%03...
true
c010180f465276f69e14e02bfdfb4a4250bee303
C
AUS2020/Tarea.Esteban
/Tarea_2/factorial.c
UTF-8
467
4
4
[]
no_license
#include <stdio.h> int main () { int cont, inicial; unsigned long int nro; printf("Ingrese un numero entero positivo. Determinaremos su factorial.\n"); scanf("%d",&nro); while(nro<0){ printf("Ingrese un numero correcto.\n"); scanf("%d",&nro); } cont=nro, inicial=nro; con...
true
4c82fc6b16b74dc7eccf098ba47f9e0abe040b1c
C
MegatronVSHulk/holbertonschool-low_level_programming
/0x02-functions_nested_loops/10-add.c
UTF-8
306
3.390625
3
[]
no_license
#include "holberton.h" /** * add - The primary function being carried out * @a: the first character in formula * @b: the second character in formula * Description: Parses 'a' and 'b' and returns 'val' * a blank line * Return: returns @val */ int add(int a, int b) { int val; val = (a + b); return (val); }
true
e8f26f87e03f294dd46d68b4278157b10a31555c
C
ankancode/Codechef--C-Codes
/sgs.c
UTF-8
1,437
3.046875
3
[]
no_license
#include<stdio.h> #include<stdlib.h> #include<math.h> void sort(int *arr,int num) { int i,temp,j; for(i=0;i<num-1;i++) { for(j=i;j<num-1;j++) { if(arr[j]>arr[j+1]) { temp=arr[j]; ar...
true
839a38fa8e9f23a6a7e285ec4960f90bf11caead
C
ImSahilShaikh/BE_IT_Assignments
/SE_IT/PL/Ass4.c
UTF-8
2,998
3.4375
3
[]
no_license
#include<stdio.h> //#include<conio.h> struct data { int rollno; char name[20]; int age; int per; }; void create(struct data d[10], int i) { printf("\nStudent No.: %d\n",i+1); printf("Enter Roll No: "); scanf("%d",&d[i].rollno); printf("Enter Name: "); scanf("%s",d[i].name); printf("Enter Age: "); scanf("%d"...
true
55bb56590da53c5a07fa498e492405094765325c
C
shobhitguptavmc/simple_things
/Parenthisization/src/main.c
UTF-8
3,714
3.171875
3
[]
no_license
/* * main.c * * Created on: Feb 6, 2014 * Author: gankit */ #include <stdio.h> #include <stdlib.h> #include <time.h> #define TEST #undef TEST #ifndef TEST #define NO_OF_MATRICES 15 #else #define NO_OF_MATRICES 3 #endif #define INF ~(1 << 31) #define ZERO 0 inline int min(int a, ...
true
7227c3fa81020c65650e2e32adef90a1dcd18525
C
gotbordom/random_code
/school/Spring2018/csci3753_os/probSets/monitor.c
UTF-8
712
2.578125
3
[]
no_license
// Name: Anthony Tracy // Note this is still psudocode, there is implimentation of C for most part, but still psudocode // This would be code found in a fucntion that the process would fork() // Let there be some shared data as shown below: MAX_THREAD=4; AT_BARRIER=0; /* This is some section of code that each ...
true
728d628384a9109f732a283e82596e9e36df6796
C
alpheios-project/morpheus
/src/greeklib/normucase.c
UTF-8
565
2.953125
3
[]
no_license
#include <greek.h> #include "normucase.proto.h" /* * convert from beta code capital letters * * greg crane * february 1987 */ /* * start with something like "*(/ellhn" * and end with "E(/llhn" */ normucase(char *word) { register char * s; register char * t; if( *word != BETA_UCASE_MARKER ) return(0); s ...
true
eb1f43c78939f5f48e0cf5520c5cf9d9fc758d08
C
astabschneider/astabschneider.github.io
/_site/git/sigchain.h
UTF-8
1,725
3.15625
3
[ "GPL-1.0-or-later", "LGPL-2.0-or-later", "LGPL-2.1-only", "GPL-2.0-only", "GPL-3.0-only", "MIT" ]
permissive
#ifndef SIGCHAIN_H #define SIGCHAIN_H /** * Code often wants to set a signal handler to clean up temporary files or * other work-in-progress when we die unexpectedly. For multiple pieces of * code to do this without conflicting, each piece of code must remember * the old value of the handler and restore it either ...
true
ca533bf508c35a4710a2e10323cc94e8f36a4725
C
crz21/test1
/CoAPBlk.c
UTF-8
987
3.046875
3
[]
no_license
/*----------------------------------------------- SIZE.c - ------------------------------------------------*/ #include <stdlib.h> #include <string.h> #include "Common.h" #include "CoAPBlk.h" /** * Construct SIZE struct */ void NewBlock(CoAPBlk_t *blk, u8 bf, u8 blkn, u16 len) { blk->bf = bf; blk->blkn = blkn...
true
b7953c0c2e79154025e81f8fec64d0a3c35d7a9e
C
erik/acedia
/kernel/time/time.c
UTF-8
1,129
2.96875
3
[ "ISC", "LicenseRef-scancode-unknown-license-reference" ]
permissive
#include "time.h" static unsigned timer_ticks = 0; static time_handle handles[NUM_TIME_HANDLES]; static int handle_index = -1; void set_phase(unsigned hz) { unsigned divisor = 1193180 / hz; /* Calculate our divisor */ outb(0x43, 0x36); /* Set our command byte 0x36 */ outb(0x40, divis...
true
bcaedff13642e862c620a32bb006b1ab1a84d02f
C
rafael2710/sendmail
/src/sendMail.c
UTF-8
4,178
2.875
3
[]
no_license
/* * sendMail.c * * Rafael dos Santos Alves (rafael2710@gmail.com) * Viviane de França Oliveira (viviane.oliveira123@gmail.com) * */ #include "network.h" #include "error.h" #include "const.h" #include "types.h" int main (int argc, char *argv[]) { int port=0; char server[MAXNAMESIZE]; char from[MAXNAMESIZE]; ...
true
42bde75d2654f5375ab8b2a860413bf8835be484
C
dybl/awesome_c
/base/test/字符升降排序.c
UTF-8
261
2.96875
3
[ "Apache-2.0" ]
permissive
#include<stdio.h> void main() { char str[81],*p=str,*q,t; gets(str); printf("The origenal string:\n"); puts(str); for(p=str;*(p+1);p++) for(q=p+1;*q;q++) if(*q<*p) { t=*p; *p=*q; *q=t; } printf("The result string:\n"); puts(str); }
true
220568c15f28a55c99e22eed17cc1ac78bb88c00
C
mapryl/Course-C
/Pyramid/ex00/sastantua.c
UTF-8
2,541
2.796875
3
[]
no_license
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* final.c :+: :+: :+: ...
true
b07fb10777ad75aee3d0aabd811fae7d83f426bc
C
glasset/42_1
/algorithmie_1/alum/main.c
UTF-8
2,105
2.765625
3
[]
no_license
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* main.c :+: :+: :+: ...
true
ce20e7d6505b15494bfbdd21bd8ff407f0adbd24
C
curiousTauseef/BLANT
/libwayne/include/event.h
UTF-8
894
3.453125
3
[]
no_license
#ifndef _EVENT_H #define _EVENT_H /* Events are actually function pointers, and your event is expected to take ** one argument that is a pointer to the object to which the event occurs. */ typedef void *Object; typedef void (*Event)(Object); typedef double Time; typedef struct _eventStruct { Time time; Event...
true
bd4351c78e83ec35563712e599d2758c3e079354
C
cdrfiunlp/sumoGeek
/firmware/lib/motorLib/motorLib.h
UTF-8
960
2.546875
3
[]
no_license
/* ------------------------------------------------------------------------- * Project: sumoGeek * Author: Germán Sc. * Date: 18-08-17 * Version: 0.1 * * Description: * Biblioteca para el control de los motores. * ------------------------------------------------------------------------- */ #ifndef SRC...
true
b50d567e7d94edfc2970fb24b2c04a45e1ce8dea
C
ayush1612/Data-Structures
/convert_expression.c
UTF-8
1,119
3.515625
4
[]
no_license
#include<stdio.h> #include<stdlib.h> #define size 30 char s[size]; int top=-1; void push(char item) { if(top==size-1) printf("Overflow"); else s[++top]=item; } int is_operator(char item) { if(item=='*'||item=='/'||item=='+'||item=='-'||item=='^') return(1); else return(0); } int precedence(char item) { if(item=='^'...
true
db0ac6555b8759db74b43394d0f4caff9b668708
C
cincospenguinos/SL-Tracker
/src/log_menu_window.c
UTF-8
3,368
2.765625
3
[]
no_license
#include <pebble.h> #include "log_menu_window.h" #include "old_entry_window.h" #include "model.h" Window *log_menu_window; // The window that houses it all static MenuLayer *log_menu_layer; // The layer that houses it all static WorkoutPeek *workouts; // The collection of workouts that we need to worry about to avoi...
true
b532ca3cfddb0ad37adcd13dfafb1f2c27b8ddd5
C
Xfan0225/c-luogu
/P2676_超级书架/main.c
UTF-8
638
2.921875
3
[]
no_license
// // main.c // P2676_超级书架 // // Created by 谢 on 2019/9/24. // Copyright © 2019 谢. All rights reserved. // #include <stdio.h> int ls[20005]; int main() { int n,b,i,j,val,sum=0,time = 0; scanf("%d%d",&n,&b); for (i=0; i<n; i++) { scanf("%d",&ls[i]); } for (i=0; i<n; i++) { for (j...
true
49c0a5fb7b93c9df4fbe62db8cbbf09af2c769a5
C
Daniel-Xu/algorithm
/quick_sort/main.c
UTF-8
346
3.203125
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include "quick_sort.h" void print(int array[], int num) { for (int i = 0; i < num; ++i) { printf("%d\t", array[i]); } printf("\n"); } int main(int argc, char const *argv[]) { int a[] = {13,19,9,5,12,8,7,4,21,2,6,11}; print(a, 12); quick_sort(a, 0, 11); pri...
true
983eb9c33f324be1b20c0bf4954486edb3176c99
C
jashwanth/academics
/sem3/embedded hardware/ehd/lab 1/exp1.c
UTF-8
293
2.53125
3
[]
no_license
#include<avr/io.h> #include<avr/delay.h> #define PORT PORTD #define DDR DDRD int main(void) { DDR = 0xFF; PORT = 0x00; while(1) { for( int i =0 ; i<8 ; i++) PORT = (1<<i),_delay_ms(80); for( int i = 7 ; i>=0 ; i--) PORT = (1<<i), _delay_ms(80); } }
true
f6aee885043dc59d989a657b4fc3eeb02a2e71ea
C
joom/certicoq
/plugin/runtime/prim_floats.c
UTF-8
7,472
2.609375
3
[ "MIT" ]
permissive
#include <stdio.h> #include <stdlib.h> #include <stdint.h> #include <math.h> #include "gc_stack.h" #include "prim_int63.h" typedef value primfloat; typedef value primfloatintpair; typedef value primfloat_comparison; typedef value primfloat_class; #define trace(...) // printf(__VA_ARGS__) #define Double_block 1277 //...
true
70441e5dcc5b37cf41da5c8f1f853111c8ab556e
C
goeb/reference
/C/floats.c
UTF-8
434
3.734375
4
[]
no_license
#include <stdio.h> void display_float(double x) { int i; for (i=0; i<8; i++) { // 8 is sizeof(double) unsigned char c; c = ((char *)(&x))[i]; printf("%x-", c); } printf("\n"); } main() { double a = 800.0 ; double b = 0.75 ; double c = 0.6 ; printf("sizeof(double)=%d\n", sizeof(double)); printf("a=%f...
true
b9996d69735cf77cffc380b04ccf47e5a31e8b6c
C
bartngonzalez/ft_printf
/ft_s_conv.c
UTF-8
2,288
2.828125
3
[]
no_license
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_s_conv.c :+: :+: :+: ...
true
25bd15a9f08b6549e78e32f852ed92884f3d41c5
C
keksikkeksik/timp-726-1_tis
/726-1_tis-3-1.c
UTF-8
2,658
3.515625
4
[ "BSD-3-Clause" ]
permissive
#include <stdio.h> #include<stdlib.h> typedef struct node { int value; struct node *next; struct node *prev; } node; node *head=NULL; node *tail=NULL; int isEmpty() { if ((head==NULL)&&(tail==NULL)) return 1; else return 0; } int init(int value) { struct node *tmp; tmp = (struct node*)malloc(sizeof(struct node)); t...
true
a0922f77a072263290dad9db669a666b5f236e33
C
hussyvel/cplu_plus
/c/lacofor/testafor.c
UTF-8
394
3.3125
3
[]
no_license
#include <stdio.h> void main (void) { int contador; for (contador = 1; contador <=5; contador++) printf ("%d ", contador); printf ("\nIniciando o segundo laço\n"); for (contador = 1 ; contador <= 10; contador++) printf ("\nIniciando terceiro laço\n"); for (conta...
true
e65ba6ae78ddf96e148be704335a9cd8bedf0300
C
PriyadarshiniSinghSolanki/Hello-World
/Final_tryOut.c/src/Final_tryOut.c.c
UTF-8
1,414
4.0625
4
[]
no_license
/* ============================================================================ Name : c.c Author : Priyadarshini Singh Solanki Version : Copyright : Your copyright notice Description : Hello World in C, Ansi-style ============================================================================ */...
true
14b73072e8aa63b8a07f33691d73b6729bc94691
C
ivanovkirilg/Code-Academy
/02Feb/01/20210201_11.c
UTF-8
487
3.890625
4
[]
no_license
/* Задача 11. Напишете функция void squeeze(char s[], int c), която премахва символа с от низа s[] */ #include <stdio.h> /* "abacd" .3 bcd */ void squeeze(char s[], int c) { int i = 0, j = 0; while (s[i] != '\0') { if (s[j] == c) j++; s[i] = s[j]; i++, j++; } } int main() { ...
true
930b5adb29f32936d25041ea025cbc99723d8a2e
C
ucd-unix-silver-s18/hw1_john
/main.c
UTF-8
255
2.875
3
[]
no_license
#include <stdio.h> #include <stdlib.h> int main(int argc, char **argv) { FILE* inputFile = fopen("sample_text.txt", "r"); int c; while ((c = fgetc(inputFile)) != EOF) { putchar(c); } fclose(inputFile); exit(0); }
true
a69c36352fedea80549184c25df26f7be370a511
C
PengLianqing/mqtt
/mqttJson/publish_loop.c
UTF-8
2,074
2.71875
3
[]
no_license
#include "stdio.h" #include "stdlib.h" #include "string.h" #include "unistd.h" #include "time.h" #include "MQTTClient.h" #define ADDRESS "211.67.16.19" #define CLIENTID "cpp-mqtt-0001" #define TOPIC "/python/mqtt" // QoS0,At most once,至多一次; // QoS1,At least once,至少一次; // QoS2,Exactly once,确保只有一次。 #define ...
true
9820eb3ec76928ede45ece2d66a42f973c0dabca
C
leorge/Sort
/src/merge_array.c
UTF-8
2,549
3.21875
3
[]
no_license
/* * merge_array.c * * Entire merge sort. * * Created on: 2013/01/11 * Author: leo */ #include "sort.h" static int (*comp)(const void *, const void *); static size_t length; /* array_sort */ static void copy(void *dst, const void *src, size_t size) { #ifdef DEBUG qsort_moved++; #endif memcp...
true
86f1f05733e959070e306eb58918d3317ae6b954
C
PrateekJain14/Data_structures
/recursion/CombinationFormula/main.c
UTF-8
473
3.75
4
[]
no_license
#include <stdio.h> #include <stdlib.h> int fact(int val){ int res = 1; for(int i=val;i>0;i--){ res *= i; } return res; } float c(int n ,int r){ int t1, t2, t3; t1 = fact(n); t2 = fact(r); t3 = fact(n-r); return t1/(t2*t3); } float pascalTriangleC(int n ,int r){ if(r == 0 || n == r) return 1; else return pa...
true
6516906a0fbb608ef6059700eb2a14a96fce6664
C
lde-batz/nm-otool
/libft/srcs/ft_printf/length_conversion1.c
UTF-8
3,747
2.578125
3
[]
no_license
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* length_conversion1.c :+: :+: :+: ...
true
3234cdf79a4bc8cb25f2947844b230747a56fe7b
C
ACMCMC/SOII
/foro/foro_solucion_peterson/sumas_hilos.c
UTF-8
1,315
3.4375
3
[]
no_license
// Aldán Creo Mariño, SOII 2020/21 #include <stdlib.h> #include <stdio.h> #include <unistd.h> #include <string.h> #include <errno.h> #include <fcntl.h> #include <pthread.h> #include <math.h> double suma = 0; int T, M; #define FALSE 0 #define TRUE 1 #define N 2 int turno; int interesado[N]; void entrar_region(int pr...
true
b6b5497c09cb98771cdfb376f24c2889bff9f0c8
C
smowton/llpe
/test/progs/varargs-dyn.c
UTF-8
311
2.546875
3
[ "LicenseRef-scancode-unknown-license-reference", "NCSA" ]
permissive
#include <stdarg.h> #include <stdio.h> int f(void* junk1, char junk2, int n, ...) { va_list l; va_start(l, n); int ret = 0; for(int i = 0; i < n; ++i) { ret += va_arg(l, int); } va_end(l); return ret; } int main(int argc, char** argv) { return f(0, 2, 5, argc, argc, argc, argc, argc); }
true
adaf44532bf6301c44aa0c43003b17c35ce57fe8
C
cozzivincenzo/PSD
/ADT Libro/input_file/main.c
UTF-8
6,370
3.359375
3
[]
no_license
#include "functions.h" int main(int argc, char *argv[]) { /* Controllo del corretto inserimento di argomenti a riga di comando */ if(argc!=2){ printf("\nNumero errato di argomenti, si prega di scrivere solo il nome dell'eseguibile seguito dal nome del file\n\n"); exit(-1); } FILE *fi...
true
6ea608e2444b8f5caee7b5b6ceaeef4ce38da18b
C
peri2094/Source
/8_Linetracer/8. Linetracer/main.c
UTF-8
1,081
2.671875
3
[]
no_license
#include "sensor.h" #include "motor.h" int main(void) { _delay_ms(3000); // 3초후 동작 int error_val; sensor_init(); // 포트C를 센서 입력으로 설정 motor1_init(); motor2_init(); while (1) { error_val = get_error(get_sensor()); // 에러값 저장 (-3 ~ +3) motor1_get_spd(error_val); motor2_get_spd(error_val); ...
true
f37de88c487044bdc53e03c3099ac307c90e0094
C
jagtapshubham/C
/Basic/integer_literal_const.c
UTF-8
252
3.75
4
[]
no_license
#include<stdio.h> int main() { int a=023; // 0 before a number is octal int b=0x23; printf("octal 023 is %d in decimal\n",a); printf("hexadecimal 0x23 is %d in decimal\n",b); printf("Size of 23L is %d",sizeof(23L)); return 0; }
true
8ae18ba68647a9320d67f2b346adc7a3e458b24d
C
isabella232/AnghaBench
/source/freebsd/contrib/mandoc/extr_term_ps.c_ps_putchar.c
UTF-8
987
2.640625
3
[]
no_license
#define NULL ((void*)0) typedef unsigned long size_t; // Customize by platform. typedef long intptr_t; typedef unsigned long uintptr_t; typedef long scalar_t__; // Either arithmetic or pointer type. /* By default, we understand bool (as a convenience). */ typedef int bool; #define false 0 #define true 1 /* Forward d...
true
3ab75ced91a3643fdfd9db586f6da4cde4e79d09
C
jaejunha/Baekjoon
/1613.c
UTF-8
489
2.796875
3
[]
no_license
#include <stdio.h> int n, s; int z[401][401]; int main() { scanf("%d %d", &n, &s); for (int i = 1, a, b; i <= s; i++) { scanf("%d %d", &a, &b); z[a][b] = -1; z[b][a] = 1; } for (int i = 1; i <= n; i++) { for (int j = 1; j <= n; j++) { for (int k = 1; k <= n; k++) { if (z[j][i] && (z[j][i] == z[i][...
true
5157b0aa49242ab43e04a1c61eb802c93b6267f3
C
RaiyanMahin/Competetive-Programming
/UVa/11958.c
UTF-8
1,031
2.515625
3
[]
no_license
#include<stdio.h> #include<stdlib.h> int main() { int i,j,k,T,minx,minn,bus,b[1001],ch,cm,th[1001],tm[1001],tn[1001]; scanf("%d",&T); for(i=1;i<=T;i++) { scanf("%d %d:%d",&bus,&ch,&cm); for(j=0;j<bus;j++) { scanf("%d:%d %d",&th[j],&tm[j],&tn[j]); }...
true
a4d7970b2189f30e4ac6d41e1c763ad33aa1a3df
C
mvhou/libftprintf
/libft/ft_get_next_line.c
UTF-8
2,775
2.734375
3
[]
no_license
/* ************************************************************************** */ /* */ /* :::::::: */ /* get_next_line.c :+: :+: ...
true
978595e2a2d709b90788aabbd2630c851622761c
C
damnkiwi6120/C-programming
/ch9/selectionSort.c
UTF-8
870
3.40625
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <time.h> void selectionSort(int size, int arr[]) { int temp = 0, max = 0; for(int i = 1; i < size; i++) if(arr[i] > arr[max]) max = i; temp = arr[size - 1]; arr[size - 1] = arr[max]; arr[max] = temp; if(size != 2) ...
true
35a420573fb1941c8b3e80a67ee7aa901635b038
C
itsyehoo/CIS330
/Proj3B/functions.C
UTF-8
4,681
3.421875
3
[]
no_license
//Project 3B #include <functions.h> #include <fstream> #include <iostream> #include <stdio.h> #include <stdlib.h> using namespace std; //File read and write functions void ReadImage(char *filename, Image &output) { FILE *f_in; char magicNum[128]; int width, height, maxval; Pixel *aBuffer; f_i...
true
92fdb00c3448a8e1df5fdb29f95da99e5fc3abe1
C
maxmastalerz/C-ADTs
/Hash-table/src/createNode.c
UTF-8
633
3.46875
3
[]
no_license
/* Maksymilian Mastalerz(0956502) mmastale@mail.uoguelph.ca */ #include <stdio.h> #include <stdlib.h> #include "HashTableAPI.h" #include "functions.h" /**Function for creating a node for the hash table. *@pre Node must be cast to void pointer before being added. *@post Node is valid and able to be added to the hash t...
true
21548634b4a85bf445509db47e97c3fc51e0151d
C
PinskayaNika/BMSTU
/Algorithms and Data Structures/knutt-morris-pratt_substring_in_string_entrances.c
UTF-8
1,343
3.109375
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <string.h> int *pi; void prefix(char *str, int ind) { int i, t = 0; pi[0] = 0; for (i = ind; i < strlen(str); i++) { //t = pi[t - 1]; while ((t > 0) && (str[t] != str[i])) t = pi[t - 1]; if (str[t] == str[i]) ...
true
0dc32f3985be57c6c5bdb38ffae14694755027af
C
larreaf/tp-2018-2c-SO
/sAFA/types.h
UTF-8
1,963
2.65625
3
[]
no_license
#ifndef TYPES_H_ #define TYPES_H_ #include <stdio.h> #include <stdlib.h> #include <pthread.h> #include <commons/log.h> #include <commons/collections/queue.h> #include <commons/collections/list.h> #include <commons/string.h> #include <ensalada/validacion.h> #include <readline/readline.h> #include <readline/history.h> #i...
true
2fab5994ea416d62899ada254172e27c69fbcbcd
C
vvysotsk/fillit
/read.c
UTF-8
2,737
2.765625
3
[]
no_license
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* read.c :+: :+: :+: ...
true
d9a04149b923ebbab92f86e2d8ba76a0d5fbf79d
C
Anran31/soal-shift-sisop-modul-3-B08-2021
/soal1/Client/client.c
UTF-8
8,487
2.6875
3
[]
no_license
#include <stdio.h> #include <sys/socket.h> #include <stdlib.h> #include <netinet/in.h> #include <string.h> #include <unistd.h> #include <arpa/inet.h> #include <ctype.h> #include <limits.h> #include <errno.h> #define PORT 8080 void getCreds(int sock, char *buffer, char *cmd) { memset(buffer,0,2048); memset(cmd,...
true
678b787f6e58dac5013e9ff0e854d5a887139bf2
C
wilsonsk/Abstract-Data-Types
/Week_0/Student.h
UTF-8
356
3.28125
3
[]
no_license
#ifndef STUDENT_H #define STUDENT_H #include <stdio.h> #include <string.h> typedef struct Student{ int id; char name[40]; }Student; void printStudent(Student *s){ int c = 10; printf("Name of student: %s\n", s->name); printf("ID of student: %d\n", s->id); printf("Inside printStudent, c = %d...
true
30538dff7d25a155d3788568bb32907d1b3e1475
C
ntntheboy/IESB-Programas
/APC-2/malloc.c
UTF-8
409
3.53125
4
[]
no_license
Malloc = Memory Allocation #include <stdio.h> #include <stdlib.h> #include <math.h> #include <locale.h> int main(){ setlocale(LC_ALL, "Portuguese"); int* vetor = (int*) malloc(20); //Malloc alocação de bytes na memória, nesse caso, 20bytes if(vetor == NULL){ printf("Memória Insuficiente!\n"); } else{ printf...
true
589abf9cab255a2e40cc3ba7b6fec1b149077fba
C
achan001/MAPM-5
/MAPM/mapm_np2.c
UTF-8
371
2.546875
3
[ "MIT" ]
permissive
static unsigned next_pow2(unsigned v) { #if defined(__GNUC__) && defined(__i386) if (v <= 2) return v; __asm__("bsrl %1, %0" : "=r" (v) : "r" (v-1)); return 2 << v; // smallest pow-of-2 >= v #else v--; // from bit twiddling hacks v |= v >> 1; v |= v >> 2; v |= v >> 4; v |= v >...
true
15b648500d994ed4bfd8cc5bdec562caabdbdb86
C
ez0nda/ft_select
/srcs/term.c
UTF-8
2,244
2.59375
3
[]
no_license
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* term.c :+: :+: :+: ...
true
2e2574e7f4a08d26aa473175e1ec9c2b1103c660
C
twilight05/alx-low_level_programming
/0x05-pointers_arrays_strings/2-strlen.c
UTF-8
191
3.03125
3
[]
no_license
#include "main.h" /** * _strlen - to find the length of a string * @s: points to the string to check * Return: void */ int _strlen(char *s) { int i = 0; while (s[i]) i++; return (i); }
true
5b4f8459611f7e7719f87b7501ff008432c0a386
C
chundonglinlin/algorithm016
/Week_02/429-levelOrder.c
UTF-8
2,837
3.609375
4
[]
no_license
/* * ===================================================================================== * * Filename: offer-levelOrder.c * * Description: * * Version: 1.0 * Created: 2020/09/20 15时51分43秒 * Revision: none * Compiler: gcc * * Author: YOUR NAME (), * Or...
true
e728f4aa1653056fe7993f36872bb2e43f9414df
C
MasterXiong/ALU-Simulator
/code/unsigned_int_test.c
UTF-8
3,835
3.71875
4
[]
no_license
#include <stdlib.h> #include <stdio.h> #include "unsigned_int_operation.h" #include "utils.h" void test_equal_unsigned_int_add(unsigned int a, unsigned int b) { unsigned int add_true = a + b; bool * a_bits = num_to_bits((void *)&a); bool * b_bits = num_to_bits((void *)&b); bool * add_bits = (bool *)malloc(sizeof(...
true
3554822eb57170161a24a1bf62fdcc36e956755e
C
aadarshkumaran/cracking-the-coding-interview
/Chapter17/17.1.c
UTF-8
403
3.78125
4
[]
no_license
#include <stdio.h> #include <stdlib.h> void swap1(int *a, int *b){ *a = *a + *b; *b = *a - *b; *a = *a - *b; } void swap2(int *a, int *b){ *a = *a ^ *b; *b = *a ^ *b; *a = *a ^ *b; } int main(){ int a = 13; int b = 7; printf("%d = a and %d = b\n", a, b); swap1(&a, &b); printf("%d = a and %d = ...
true
459e5d2e600e889fcf72f2dc1e232f1bb3e63c45
C
tomeon/OSU-CS
/2013_Fall/cs261/hw/hw1/Q2.c
UTF-8
1,508
4.15625
4
[]
no_license
/* CS261- Assignment 1 - Q.2*/ /* Name: Matt Schreiber * Date: 10-12-2013 * Solution description: Passes three values to foo(), which manipulates * them in certain ways. Prints their initial * values to the console, and also prints their * ...
true
e1c82b1979f39c25baad62fbd5acddde8756b2cc
C
jordanzyx/Lab11
/main.c
UTF-8
1,517
3.09375
3
[]
no_license
#include <stdio.h> int maze(char[8][8], int x, int y, int x2, int y2,int visited[8][8]); int main() { char a[8][8] = { {'x', ' ', ' ', ' ', ' ', ' ', ' ', ' '}, {'x', ' ', 'x', ' ', ' ', ' ', ' ', ' '}, {'x', ' ', 'x', ' ', ' ', ' ', ' ', ' '}, {'x', ' ', 'x', 'x', ...
true
a90de14a63054b7b1583c66dd94b6e482ef25d14
C
chishengshih/2015MP
/MP0/ReferenceCode/add_main.c
UTF-8
352
3.28125
3
[]
no_license
#include <stdio.h> #include <stdlib.h> int main(int argc, char** argv) { unsigned n = 0, i, total; if (argc < 2) { scanf("%u", &n); } else { n = atoi(argv[1]); } total = 0; for (i = 1; i <= n; ++i) { total += i; #ifdef PRINT if (i % 5 == 0) { printf("%u\n", i); } #endif } ...
true
958be0131cd478cbfcef01bd9dc6346171d6177a
C
muthamilanram10/clearning
/t13.c
UTF-8
313
3.046875
3
[]
no_license
#include<stdio.h> struct student { int rollno; char name[20]; int percentage; }student; void main() { student rollno=1; strcpy(student.name,"tamil"); student.percentage=92; printf("rollno=%d",student.rollno); printf("name=%s",student.name); printf("percentage=%d",student.percentage); }
true
eeb48e198ea5f0be45004dfdda6860d1280e73c2
C
287631983/example_code
/step2_code/1day_code/led_plat_v1/led_plat_drv.c
GB18030
2,372
2.59375
3
[]
no_license
#include <linux/init.h> #include <linux/module.h> #include <linux/platform_device.h> #include <asm/io.h> unsigned long *gpc0_conf; unsigned long *gpc0_data; //2,ʵprobe int led_plat_drv_probe(struct platform_device * pdev ) { struct resource *addr_res1,*addr_res2; struct resource *irq_res; int irqno;...
true
e3bdb3abe7e5a93e1050785d05db4a5ee990be2e
C
M4tsuri/c_calculator
/src/pool.c
UTF-8
1,333
3.015625
3
[]
no_license
#include "utils.h" #include "pool.h" Pool *create_pool(size_t item_size) { Pool *q = s_malloc(sizeof(Pool)); q->item_num = 0; q->item_size = item_size; q->max_item_num = 0x100; q->buf = s_malloc(q->max_item_num * q->item_size); q->cur = q->buf; q->free = delete_pool; return q; } void *...
true
42bf201e1c40b675b4e816a474ec6ccf7ddc574a
C
GlauberGoncalves/ListaDeC
/ListaDoIme/ex6.c
UTF-8
875
4.03125
4
[]
no_license
/* 6 Dados o número n de alunos de uma turma de Introdução aos Autômatos a Pilha (MAC 414) e suas notas da primeira prova, determinar a maior e a menor nota obtidas por essa turma (Nota máxima = 100 e nota mínima = 0). */ #include <stdio.h> int main() { // Variaveis int NumAlunos, nota, maior, menor, i; ...
true
217ed75f525677ab08ab933355a11ef07f89b555
C
davifmarcelino/shuffler-cards-C
/main.c
UTF-8
1,967
3.609375
4
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <string.h> typedef struct _carta { struct _carta *proximo; int valor; } CARTA; typedef CARTA *PTR_CARTA; typedef struct _baralho { PTR_CARTA topo; int tamanho; } BARALHO; typedef BARALHO *PTR_BARALHO; int esta_vazio(PTR_BARALHO baralho){ return ba...
true
914526bd0043c4c9f0f5e2cd46182b2dc78a708c
C
shanaya46/dayfive
/ex17/ft_strncat.c
UTF-8
414
3.578125
4
[]
no_license
#include <stdio.h> #include <string.h> char *ft_strncat(char *dest, char *src, int nb) { int i, j; j = strlen(dest); for (i = 0; i < nb; i++){ dest[j] = src[i]; j++; } dest[j] = '\0'; return dest; } int main () { char src[30] = "this is the source"; char dest[30] =...
true
7b44a11893ef967cd7ce75027ebde7476206b01d
C
fabiolackib/fdf_42
/libft/ft_lstclear.c
UTF-8
1,317
3.0625
3
[]
no_license
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_lstclear.c :+: :+: :+: ...
true
6f225ac7063b1fa687af89d707beff8455ff29ef
C
ifplusor/actrie
/src/trie/acdat.c
UTF-8
14,749
2.765625
3
[ "BSD-3-Clause" ]
permissive
/** * acdat.c - Double-Array Trie implement * * @author James Yin <ywhjames@hotmail.com> */ #include "acdat.h" #include <alib/collections/list/segarray.h> #include <alib/object/list.h> /* Trie 内部接口,仅限 Double-Array Trie 使用 */ size_t trie_size(trie_t self); size_t trie_next_state_by_binary(trie_t self, size_t iNod...
true
eb56a02074eb7d66fc19a8e6aa309a5a7cf3bb2a
C
Nicolas-Lsy/c-code
/pat-乙级编程题/03我要通过!(20).c
GB18030
2,310
3.1875
3
[]
no_license
/*#include<stdio.h> #include<string.h> int main() { //עѭڲѭʹõıĸҪһ int s,i,j=0,k=0,l=0,m=0,n=0,d,count=0,sum=0,p,q,coun,count1,count2,count3; char a[101]; int c[100]; scanf("%d\n",&s); for(q=0;q<s;q++) { k=0; count=0; count1=0; count2=0; count3=0; coun=0; scanf("%s",a); //¼ַ sum=strlen(a); while(a[k]!='\0'...
true
7ae3b275def8bc7448cc51fa65b36e0cc316bf56
C
diplomaliformatci/Git
/CCPP/asdas/klm/klm/main.c
UTF-8
562
2.625
3
[]
no_license
// // main.c // klm // // Created by Can KINCAL on 14.05.2015. // Copyright (c) 2015 Can KINCAL. All rights reserved. // #include <stdio.h> int main(int argc, const char * argv[]) { int dizi[10]={25,22,17,19,47,3,5,98,10,124}; int a; int gecici; scanf("%d",&a); for (int i=0;i<10;i++) f...
true
277ff905651cd00641f8bac49bbb24ab3828bec5
C
alihitawala/Web_crawler_OS_project
/file_tester.c
UTF-8
4,903
2.984375
3
[]
no_license
#include <stdlib.h> #include <stdio.h> #include <assert.h> #include <string.h> #include <unistd.h> #include <errno.h> #include <fcntl.h> #include "crawler.h" #include <pthread.h> #include <semaphore.h> /*void *Malloc(size_t size) { void *r = malloc(size); assert(r); return r; } char *Strdup(const char *s) { v...
true
37599b12f6099dab386d3fb0bb00bc8d03f58b3d
C
AbdElhalim12/Atmega32_drivers
/eeprom.c
UTF-8
269
2.546875
3
[]
no_license
#include "eeprom.h" void eeprom_write(uint8_t data,uint16_t addr ){ while(READBIT(EECR,1)); EEAR = addr; EEDR = data; SETBIT(EECR,2); SETBIT(EECR,1); } uint8_t eeprom_read(uint16_t addr ){ while(READBIT(EECR,1)); EEAR = addr; SETBIT(EECR,0); return EEDR; }
true
585f322b4049879ee8264aef7dd4a7ef8473a978
C
CalebeRios/Proj2-FSE
/central/src/csv.c
UTF-8
734
2.96875
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <time.h> #include <unistd.h> FILE *fp; void init_csv() { fp = fopen("log.csv", "w+"); fprintf(fp, "Timestamp, TAG, WiringPi, Value\n"); } void write_csv(char *tag, int wiringPi, int value) { int hours, minutes, seconds, day, month, year; time_t now = ti...
true
378a7ab9dec21678e77f6c2ab657630ce01a02f8
C
goelvatsal/learning-c
/course2/citypop/finalcity.c
UTF-8
702
4.03125
4
[]
no_license
#include <stdio.h> int main(void) { // declare nessasary variables int cityNum = 0; int cityPop[100]; // create scanf to find out number of cities scanf("%d", &cityNum); printf("Number of cities: %d", cityNum); // create scanfs to find out pop per city for(int i = 0; i < cityNum; i++) ...
true