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
684f509c87dc3457fcfc3c91a3f7371bd1c1af6c
C
youseokhwan/applay-mentoring
/16년 1학기 C 멘토링/C Study/스터디 연습문제/솔루션/010.c
UHC
412
4.0625
4
[]
no_license
//// 10 - Է¹޾ Ǵϴ α׷ Ͻÿ. //// ( - 4 ̰, 100 ƴ or 400 ) //#include <stdio.h> //int main( ) //{ // int year; // Է¹ // // printf(" Է: "); // scanf("%d", &year); // // if(((year%4==0)&&(year%100!=0))||(year%400==0)) // printf("\n"); // else // printf("\n"); //}
true
7fb2b46c5898ceee21cfaba34cf107fa9aaad0db
C
Gh4stz/cau-truc-du-lieu-and-giai-thuat
/codelearn.io/queue/bai19.c
UTF-8
1,232
3.3125
3
[]
no_license
#include<stdio.h> #include<stdlib.h> #include<stdbool.h> int enqueue(int queue[], int *back, int *p, int a){ (*p)++; queue = (int *)realloc(queue, (*p) * sizeof(int)); queue[*back] = a; (*back)++; } int pop(int *front){ (*front)++; } int main(){ int n, i, j; scanf("%d",&n); int a[n]; ...
true
edcf77f990bdf5a47fa4ed0057a272742185995f
C
sandormatyi/PolySynth
/include/MidiNote.h
UTF-8
255
2.5625
3
[]
no_license
#pragma once #include <inttypes.h> #include <math.h> struct MidiNote { uint8_t channel; uint8_t note; uint8_t velocity; static double getFrequency(int midiNote) { return 440.0 * powf(2.0, (midiNote - 69) * 0.08333333333333333); } };
true
79288f01f039d74cdbe2f81c4209b7ebe17e94e2
C
UncleZhang1990/C
/水仙花数/水仙花数/水仙花数.c
GB18030
331
3.40625
3
[ "MIT" ]
permissive
//100~999ˮɻ #define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <math.h> int main(void) { int i = 100; do { //λ int a = i % 10; //ʮλ int b = i / 10 % 10; //λ int c = i / 100; if (pow(a, 3) + pow(b, 3) + pow(c, 3) == i) { printf("%d\n", i); } i++; } while (i < 1000); }
true
e30cc24d234eca167ebe64105d37ce8a749da563
C
AlekseyDesign/fillit
/srcs/read_file_part_3.c
UTF-8
1,819
2.671875
3
[]
no_license
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* read_filepart_3.c :+: :+: :+: ...
true
5e674e222136608ed6ce1b4d6cadc14b2ca96450
C
TejasB28/Problem_solving
/Assignment/22/Program_3/Main.c
UTF-8
1,171
4.125
4
[]
no_license
/* Problem Statement : Accept N numbers from user check whether that numbers contains 11 in it or not. Input : N : 6 Elements : 85 66 11 80 93 88 Output : 11 is present Input : N : 6 Elements : 85 66 3 80 93 88 Output : 11 is absent */ #include "Header.h" int main() { int iValue = 0; int *ptr = NULL; int ...
true
20e8451f0c36bd85ea1ac2f95a67b720b232de07
C
postavtezachet/2laba
/лр2/task17.c
WINDOWS-1251
1,343
3.65625
4
[]
no_license
#include<stdio.h> #include<locale.h> int main() { setlocale(LC_ALL, "Russian"); int n,s,k=0,r=0; printf(" "); scanf_s("%d", &n); s = n; // // - while (5 < 6) { // if (s % 10 == 0) { break; } else { s /= 10; k++; } } if (k == 1) { printf(" , ...
true
2ecacc0cff41f8bf94e9551f7e67843db4442e79
C
Sparrow-lang/sparrow
/src/Nest/Api/SymTab.h
UTF-8
2,427
3.09375
3
[ "MIT" ]
permissive
#pragma once #include "Nest/Api/NodeArray.h" #ifdef __cplusplus extern "C" { #endif /// Structure describing a symbol table, with multiple entries /// Note that the entries will be allocated after this structure. struct Nest_SymTab { struct Nest_SymTab* parent; ///< The parent symbol table Nest_Node* node; ...
true
a2ea89a6ea45cfa0ba607c2c98939e1fd4e33203
C
Subathra19/Data-Structures-and-Algorithms
/Exercises/Array/Array-with-Numbers/Exercise46.c
UTF-8
912
3.28125
3
[ "MIT" ]
permissive
//Maximum intervals overlap #include <stdio.h> void insertionSort(int a[],int n){ for(int i=1;i<n;i++){ int j=i-1; int key=a[i]; while(j>=0 && a[j]>key){ a[j+1]=a[j]; j=j-1; } a[j+1]=key; } } void maxGuests(int a[],int e[],int n){ insertionSort...
true
59d8543f9f59b58a13ef8d580d9b43d4229e1c53
C
panasico/os_lab_2019
/lab4/src/parallel_min_max.c
UTF-8
6,642
2.921875
3
[]
no_license
#include <ctype.h> #include <limits.h> #include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <sys/time.h> #include <sys/types.h> #include <sys/wait.h> #include <getopt.h> #include "find_min_max.h" #include "utils.h" pid_t currentPID; int ShowZombies(){ FIL...
true
c09bb886f7f56dca129fa4271186fadeabe34afd
C
yahnik/TaintTracking
/llvm/projects/test-suite/MultiSource/Benchmarks/Trimaran/enc-rc4/rc4.c
UTF-8
3,995
2.578125
3
[ "NCSA" ]
permissive
/* * An implementation of the ARC4 algorithm * * Copyright (C) 2001-2003 Christophe Devine * * 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; either version 2 of the License, or * ...
true
9fc5858257c2a7d732d4a71a2e2dcf9dd18baa7d
C
DAQSimple/DSX_fw
/dsx-fw/DSX_Library/Command/Inc/channel.h
UTF-8
525
2.609375
3
[]
no_license
/* * channel.h * * Created on: May 30, 2021 * Author: jpaca */ #ifndef CHANNEL_H #define CHANNEL_H #include "main.h" #include <stdint.h> #include "board_defines.h" typedef struct channel_t { GPIO_TypeDef * port; uint16_t pin; }channel_t; // Function to convert loc to channel_t // check loc and compare ...
true
6758b9b7812b7389caca05c928306f3b085036ee
C
pg30/Data-Structure-assignments
/data structure assn 3/0801CS171056_3.4.c
WINDOWS-1252
1,639
3.6875
4
[]
no_license
#include<stdio.h> #include<stdlib.h> #include<string.h> char opr1[50],opr2[50]; struct stack { char data[1000]; struct listItem *next; }; typedef struct stack STACK; //create a new node STACK *createStack() { STACK *create; create = (STACK*)malloc(sizeof(STACK)); create->next=NULL; return create; } //insert...
true
9611af38558257779527f3bb4f4f6ee704062b99
C
wanderwg/BinTreeFind
/BinTreeFind.c
UTF-8
381
2.6875
3
[]
no_license
#include "BinTree.h" #include <malloc.h> #include <assert.h> #include <stdio.h> #include <string.h> #include "Queue.h" BTNode* BinaryTreeFind(BTNode* pRoot, BTDataType x) { if (pRoot == NULL) return NULL; if (pRoot->_data == x) return pRoot; BTNode* pTemp = NULL; if (pTemp = BinaryTreeFind(pRoot->_pLeft, x)) ...
true
1e537949fe0c5944364419b256ad43c3edc9feb2
C
jrunzer26/OperatingSystemsTutorials
/Tutorial5/myshell.c
UTF-8
2,729
3.09375
3
[]
no_license
/* * MyShell Project for SOFE 3950U / CSCI 3020U: Operating Systems * * Copyright (C) 2015, Albert Fung 100520898, Jason Runzer 100520992, Nicholas Gregorio 100514374 * All rights reserved. * */ #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <dirent.h> #include <sys/types.h> #include <sys/wa...
true
f08ff4446054d79612724a663cec89c42a2b164a
C
PashaEfimchik/prog_953505
/pznkv/lab2/zad1.c
UTF-8
7,307
2.765625
3
[]
no_license
#include <stdio.h> #include <math.h> #include <conio.h> #define true 1 #define false 0 #define err -2000123000 #define max 2147483646 typedef struct { double inet, vlc, oth, sms, mms, abr; } user; double stod1(char s[1000]) { int i = 0, o = false; double sm = 0; if (s[0] == '-') ...
true
8cb38606709ff6eca610be22f46308430a85e2ea
C
JohnCottrell/holbertonschool-low_level_programming
/0x14-file_io/3-cp.c
UTF-8
1,567
3.578125
4
[]
no_license
#include "holberton.h" /** * cant_read - prints error message upon failure to read * @str: filename * Return: void */ void cant_read(char *str) { dprintf(STDERR_FILENO, "Error: Can't read from file %s\n", str); exit(98); } /** * cant_write - prints error message when n fails to create or to write to file * @s...
true
75b141471673c9a1ad887a5a17ca67ef74ee76ec
C
NJannuzzi/Microprocessor-System-Design-Coursework
/labs/lab1/Part 1B/main.c
UTF-8
977
2.859375
3
[]
no_license
/* ======================================== * * Nicholas Jannuzzi * CMPE121 Spring 2016 * * * Lab Exercise 1, part 1B: PWM control of LED * * * ======================================== */ #include "project.h" #define Pot_Min 1 #define Pot_Max 65535 int32 reading; int main(void) { //initialize modules ...
true
d76a558a87386e8f04f803934c171ab4007f75d8
C
davidmunoz-dev/CPE_2015_BSQ
/src/main.c
UTF-8
1,370
2.828125
3
[]
no_license
/* ** main.c for lo in /home/munoz_d/CPE_2015_BSQ/src ** ** Made by Munoz David ** Login <munoz_d@epitech.net> ** ** Started on Sun Dec 20 21:38:17 2015 Munoz David ** Last update Sun Dec 20 22:38:28 2015 Munoz David */ #include <stdlib.h> #include <stdio.h> #include <sys/stat.h> #include <sys/types.h> #include <...
true
667e4ffdd25d0cbe4a8bbb0ec291ca208aaba3cb
C
vijaykumar10022/C-Practice
/ANITS2/stringlength.c
UTF-8
137
2.828125
3
[]
no_license
#include<stdio.h> int main() { char s[20]; gets(s); int i=0,l=0; while(s[i]!='\0') { l++; i++; } printf("%d",l); return 0; }
true
653e38ad4847b40d820053a8e29a46934bed9c27
C
alexandermerritt/tools
/src/cpuid/timing.c
UTF-8
2,033
2.953125
3
[ "MIT" ]
permissive
// Benchmark latency of various methods to learn the CPU ID. // // CPUID gives the initial APIC ID // RDTSCP gives the "processor ID" // RDPID is the same as RDTSCP but doesn't give the clock // // RDPID not available in Haswell #include <stddef.h> #include <stdio.h> #include <inttypes.h> #include <stdbool.h> #include...
true
ed064987a37b18baa95797ea09f21275da7d2530
C
Barmaley13/fatfs_csv
/examples/print_buffer.c
UTF-8
367
2.78125
3
[ "WTFPL", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
void print_buffer(CSV_BUFFER *buffer) { int i, j; printf("\n"); for (i = 0; i < buffer->rows; i++) { for (j = 0; j < buffer->width[i]; j++) { printf("%c%s%c%c", buffer->text_delim, buffer->field[i][j]->text, buffer->text_delim, buffer->field_delim); } prin...
true
9ff864b4ecd6198a1ea62470ad57236cdc4b3a09
C
RezowanTalukder/C-Program-from-Herbert-Schield-C-Programming-Book
/chap5/excercise/c51.c
UTF-8
346
3.3125
3
[]
no_license
#include<stdio.h> #include<string.h> int main() { char s[1000] ; int i ; gets(s) ; if(strlen(s)>80){ printf("lenth is gretter then 80\n") ; } for(i=0 ;i<strlen(s);i++){ if(i%10==0){ printf("\n") ; } printf("%c",s[i]) ; ...
true
de4771f518ddd0d369f6c3b0c48bb03b99e6eceb
C
DimitrijeKojic/BMSTU3_tisd
/lab_06/functions/instructions.c
UTF-8
2,841
2.84375
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <string.h> #include "instructions.h" // обход дерева, // включение, исключение и поиск узлов, void instruction_bst() { blue(); printf("\n\t\t\t\t\t\t\t\t\t\tМеню:\n\ \t\t\t\t\t\t\t▍▹ 1. %-30s\n\ \t\t\t\t\t\t\t▍▸ 2. %-30s\n\ \t\t\t\t\t\t\t▍▹ 3. %-30s...
true
2c49aec32879889e639e59acdb8e311a2551a72e
C
mmmaxou/imac1-cg
/raytracer/src/geometry.c
UTF-8
2,021
3.90625
4
[]
no_license
#include "geometry.h" #include <stdlib.h> #include <stdio.h> #include <math.h> /* Construit le point x y z */ Point3D pointXYZ(float x, float y, float z) { Point3D tmp; tmp.x = x; tmp.y = y; tmp.z = z; return tmp; } /* Construit le vecteur x y z */ Vector3D vectorXYZ(float x, float y, float z) { Vector3D tmp; ...
true
b8d0408abb7606613104e2b32f638d82ccd68e68
C
EthanHo/Systems-Programming-Projects
/proj1/gen_queue.c
UTF-8
2,439
3.5625
4
[]
no_license
#include "gen_queue.h" #include <stdlib.h> #include <assert.h> #include <pthread.h> #include <stdbool.h> #include <stdio.h> //appends an item to the end of the Queue. //Queue does not take ownership of the item, must be allocated/deallocated elsewhere int gen_append(struct gen_queue * Q, void * item) { //lock critica...
true
94e88dd27b4a3d2d5007d53b72201c44527701fd
C
chenjjer/Pointer_on_c
/chapter9/9.12.c
WINDOWS-1252
1,265
3
3
[]
no_license
#include <stdio.h> #include <string.h> #define TRUE 1 #define FALSE 0 int prepare_key(char *key) { char buffer[]; char Table = {A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y,Z}; toupper(*key); for(i=0; i<strlen(key); i++) { for(j=0; j<strlen(key);j++) { if(strcmp(k...
true
f4c14eff70db3451acfca27944382837a529d4f7
C
dils12001/C_Practice
/C/moveZeroes.c
UTF-8
565
3.671875
4
[]
no_license
#include<stdio.h> #include<stdlib.h> void moveZeroes(int* nums,int size); int main() { int nums[] = {3,0,0,84,12,0,1,0}; moveZeroes(nums,8); for(int i=0;i < 8;i++) printf("%d\t",nums[i]); } void moveZeroes(int* nums,int size) //[3,12,0,1,0] { int* temp = (int*)malloc(size*sizeof(int)); temp = calloc(size,si...
true
e4703d9b0829fcb0ceaad7d378c20b68ffb47130
C
ary-an7/First_year_programs-BASICS-
/leap_year_check.c
UTF-8
240
3.21875
3
[]
no_license
#include<stdio.h> #include<conio.h> void main() { int year; printf("Enter the year:"); scanf("%d",&year); if(year%4==0&&year%100!=0||year%400==0) printf("The year is leap year.\n"); else printf("The year is not a leap year.\n"); getch(); }
true
69339ede5879eab65535b08ea1189108a4c0bb87
C
itactuk/corregir_portafolio1_isc205
/10134133/Portafolios1/punto 8.8/joyanes8.c
UTF-8
1,379
3.671875
4
[]
no_license
// // Created by sebastian on 10/11/2019. // #include <stdio.h> #include <stdlib.h>.//me gusto mucho la interaccion int main() { int n,m, max = -1,min=1000000; printf("--------------------------\n"); printf("Valor M%cximo de la Matriz!\n",160); printf("--------------------------\n"); printf("Ingres...
true
d4742e4371435a27cbf0767f4d5887eb77066fd4
C
masomel/smv
/testcases/tc_memdom_create.c
UTF-8
1,307
2.890625
3
[]
no_license
/// Author: Terry Hsu /// Test case for creating memdom domains #include <stdio.h> #include <stdlib.h> #include <stdint.h> #include <smv_lib.h> #include <memdom_lib.h> #include <pthread.h> #define NUM_THREADS 10 #define NUM_MEMDOMS_PER_THREAD 100 // Thread stack for creating memdoms void *fn(void *args){ int i = ...
true
87adab17da96cbefeda6f2b0aa266d321886d9a3
C
ChipmunkForLove/CSE-class
/ComputerArchitecture/04-bomb-lab/bomb116/bomb.c
UTF-8
2,441
3.34375
3
[]
no_license
/*------------------------------------------------------------------------------ * 4190.308 Computer Architecture Spring 2020 * * Bomb Lab * * Handout: May 6, 2020 * Due: May 20, 2020 11:00 * * The binary bomb notifies the bomblab server automatically when you solve a * ...
true
35f190a653ea7bd99484d8667dff1be5400cb35f
C
zengtane/TSGUI
/ClusterIO/source_code/cluster_update.c
UTF-8
1,631
2.703125
3
[]
no_license
/* * Copyright 2017, Crank Software Inc. All Rights Reserved. * * For more information email info@cranksoftware.com. */ #include <stdio.h> #include <string.h> #include <stdlib.h> #include <inttypes.h> #ifdef WIN32 #include <windows.h> #else #include <unistd.h> // for usleep #endif #include <gre/greio.h> #include "...
true
76e8b956d016a819ee54cbbb07e7e74e0cda83a4
C
joaogui1/ICC2
/Projects/trab3.c
UTF-8
3,148
3.5
4
[]
no_license
/*Joao Guilherme Araujo - 9725165 */ #include <ctype.h> #include <stdio.h> #include <stdlib.h> #include <string.h> /*-----------------Trie and its functions--------------------*/ //Trie data structure definition struct Trie{ char ending; //1 if a terminating character of a word struct Trie *node[26]; }; typ...
true
6d235a368359b606b0020f3a9cac457a7753a31a
C
ashwin-nair98/ss-lab
/cpu_schedule/cpu_schedule_rr.c
UTF-8
2,198
3.609375
4
[]
no_license
#include <stdio.h> struct node { int burst_time; int wait_time; int turn_around_time; int exec_time_left; }; int main(int argc, char const *argv[]) { int n, i, j, slice, update; struct node process_list[10]; printf("Enter number of processes[max 10]: "); scanf("%d", &n); printf("Enter time slice: "); scanf...
true
7cf03ee240a17be2b7265be08b5f0598d495b816
C
vineetsalar/JPsiProduction
/Extra/NRMethod.C
UTF-8
1,644
3.875
4
[]
no_license
//Newton-Raphson Root Finding Method //Algorithm: //xi+1 = xi - f(xi)/f'(xi) //Example: find the roots of f(x) = 2x2 -x -21 //% cat newt3.cpp // Newton-Raphson method for finding the // roots of f(x) = 0 for a polynomial function #include <iostream> using namespace std; #include <cmath> double newton(double a, do...
true
a855347cfb2dff45779d974b762fb35490c0ba4d
C
MaxMa128/clanguage
/B13.c
UTF-8
404
2.90625
3
[]
no_license
#include<stdio.h> int main() { int n=10,arr[n]; int max=0,s,i,j,z; for (i=0;i<10;i++) scanf("%d",&arr[i]); i=0; for (j=0;j<10;j++) { z=arr[i]; if (z<0) max=i; i++; } i=0; for (j=0;j<10;j++) { z=arr[i]; if (z<0&&z>arr[max]) max=i; i++; } if (max!=0||arr[max]<0){ s=arr[9]; arr[9]=a...
true
06c144be1e542b2420741d7cc343cafd53394f61
C
njsaugat/DSA-Implemented-in-C-Language
/stack/backup_stack_LL.c
UTF-8
1,439
3.859375
4
[]
no_license
#include <stdlib.h> #include<stdio.h> struct node{ int data; struct node* next; }; struct node* top=NULL; void push(int key){ struct node* newnode=(struct node*)malloc(sizeof(struct node)); newnode->data=key; newnode->next=NULL; if (newnode==NULL){ printf("stack overflow"); }else{ ...
true
be727a053ed388464a04abdf6cdd71ed3f9136e2
C
hitchiker42/my-code
/cs758/asst-3/linked.c
UTF-8
2,641
3.609375
4
[]
no_license
/** Code file for hash tables. */ #include <stdlib.h> #include <string.h> #include <stdio.h> #include <assert.h> #include "storer.h" #include "eprintf.h" static State *linked_lookup(char *prefix[], int create, PrefixStorer* ps); static void linked_add(char *prefix[], char *word, PrefixStorer* ps); static void pr...
true
27fce2b1c6df61722c5c76551d301e2bd1baf929
C
SummerSunnyDay2021/8051
/24.I2C通讯/i2c.c
GB18030
5,535
3.3125
3
[]
no_license
/* * I2C ͨѶЭʵ飨2016-5-13 5 17:35 PM) I2C 鷳ĵطʱ⣬ǰǽӴ Uart ЭͲе 1602 ҺI2C ǰЭ鶼ҪЩֱʾĻͼ£ SCL ----__--__--__--__--__--__--__--__--__--__---- SDA --_S_/7 \/6 \/5 \/4 \/3 \/2 \/1 \/0 \/a \_T_-- ܽһ I2C ͨѶ 1. SCL Ϊʱźţʱӵزͷͣ SCL Ϊߵƽʱȶ 2. ʼλֹͣλͼе S Tͼ S T λöӦΪ ͵ƽʼλ SCL SDA Ϊ ߵƽʱ SDA һʱʾݴĿʼ֮෴ SCL SDA Ϊ͵ƽʱ SC...
true
f7e3237852baaf5083f216c9a13b6068258fff14
C
tamlog06/cpro2020
/week2/kadai2-3.c
UTF-8
596
2.984375
3
[]
no_license
#include <stdio.h> #include <math.h> #include <complex.h> int main() { double a,b,c; scanf("%lf", &a); scanf("%lf", &b); scanf("%lf", &c); double D = pow(b, 2) - 4 * a * c; if (D > 0) { D = sqrt(D); printf("%f\n%f\n", (-b + D) / (2 * a), (-b - D) / (2 * a)); } else if (D ==...
true
baf062f8e27a9124638a9768c992a6680bc286bd
C
hippunk/Etudes
/M1-ANDROIDE/COMPLEX/ProjetPrim/arithZn.c
UTF-8
3,261
2.5625
3
[]
no_license
#include<stdio.h> #include<stdlib.h> #include<gmp.h> #include<math.h> #include"arithZn.h" void mpzExpo_mod(mpz_t result, mpz_t m, mpz_t e, mpz_t n){ /*int i = 0; size_t fin = 0; mpz_t t; mpz_t m; mpz_t tmp; mpz_init (t); mpz_init (tmp); mpz_set(t,m); mpz_set(result,b); fin = mpz_size...
true
319f79682c0dbcbb55102394e58c6e1a34b2abfd
C
radudilirici/FMI
/Year 1/Sem 1/Programare Procedurala/5/5_4.c
UTF-8
343
2.96875
3
[]
no_license
#include <stdio.h> int A[100][100], B[100][100]; int main() { int n, m, i, j; scanf("%d %d", &n, &m); for (i=0; i<n; i++) for (j=0; j<m; j++) scanf("%d", &A[i][j]); for (j=0; j<m; j++) for (i=0; i<n; i++) B[j][i] = A[i][j]; for (j=0; j<m; j++) { for (i=0; i<n; i++) printf("%d ", B[j][i]); printf...
true
f0a7a2efa2e789358a8930194b48c945364d37af
C
Qumeric/exercises
/the-c-programming-language/4/1.c
UTF-8
519
3.328125
3
[]
no_license
# include <stdio.h> int strindex(char[], char[]); int main(void) { printf("%d\n", strindex("Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo", "buffalo")); // answer - 56 } int strindex(char s[], char t[]) { int pos = -1; int i, j; for (i = 0; s[i] != '\0'; i...
true
aa9785bcd0c7c5cd08da0540978f1a20d924fd38
C
wwwyxder/apue2testcode
/unp/server_single.c
UTF-8
2,495
2.703125
3
[]
no_license
#include <netinet/in.h> #include "unpheader.h" void print_fdset(fd_set s) { printf("{"); int fisrt = 1; for(int i=0;i<FD_SETSIZE;++i) { if(FD_ISSET(i,&s)) { if(!fisrt) printf(",%d",i); else printf("%d",i); fisrt = 0; } }...
true
4328c1281af79683dab9754df9f23bc2f4b6c3b9
C
wfmelo/knr-solution
/Chapter2/ex2-08-rightrot.c
UTF-8
869
4.1875
4
[]
no_license
/* * Exercise 2-8 * * Write a function rightrot(x, n) that returns the value of the integer x * rotated to the right n bit positions. */ #include <stdio.h> unsigned rightrot(unsigned x, int n); int main() { unsigned x = 9713; // 0010 0101 1111 0001 printf("%u\n", rightrot(x, 4)); return 0; } unsigned right...
true
eb793f4f26c8f6a8a9947fb14ec89b6f6a2cd531
C
bnn678/CS50x
/pset2/vigenere.c
UTF-8
1,715
3.578125
4
[]
no_license
#include <stdio.h> #include <cs50.h> #include <string.h> int main(int argc, string argv[]) { // Check for proper input if( argc == 1 || argc > 2 ) { printf("%i",1); return 1; } string keyword = argv[1]; int key_len = strlen(keyword); int key[key_len]; // Check for ...
true
4ed66482209b065dd9822f0a4b9b82d0839c57b8
C
verkkila/c-exercises
/6/main.c
UTF-8
442
3.3125
3
[]
no_license
#include <stdio.h> #include "read_input.h" int main(void) { int first, second; read_int("Syötä ensimmäinen kokonaisluku: ", &first); read_int("Syötä toinen kokonaisluku: ", &second); if (first % second == 0) printf("%i on %i:n %i. monikerta.\n", first, second, first/se...
true
b545bd9923ff5a98dd76b035920fd47d880ca07d
C
RazikMhd/Data-Structures-TKM-
/C Pointers/changing_pointer_values.c
UTF-8
134
3.140625
3
[]
no_license
#include <stdio.h> int main() { int* pc, c; c = 5; pc = &c; c = 1; printf("%d", c); // Output: 1 printf("%d", *pc); // Ouptut: 1 }
true
ff8aa84ab18668df2cc385222be7615e19203c99
C
RickyDonne/C-Programs
/Flow Examples/5.c
UTF-8
971
4.625
5
[]
no_license
/* A year is leap year if the following conditions are satisfied: 1.Year is multiple of 400. 2.Year is multiple of 4 and not multiple of 100. pseudo-code: if year is divisible by 400 then is_leap_year else if year is divisible by 100 then not_leap_year else if year is divisible by 4 then is_leap_year el...
true
3ae94e4de877bafe9562d3e2070882a7d3381743
C
2series/Introduction-To-Computer-Science
/pset1/greedy.c
UTF-8
743
3.609375
4
[ "MIT" ]
permissive
#include <stdio.h> #include <cs50.h> #include <math.h> #define K25 25 #define K10 10 #define K5 5 int main(void) { float balance; do { printf("Gimme a float: "); balance = get_float(); } while(balance <= 0); // convert balance to kobo int kobo = (int)round(balance * 10...
true
0ad9164f255a990584e73762367bfa0920a0b162
C
kexiaojiu/data_structure_and_algorithm_analysis
/code_chapter03/polynomial/AddPolynomial.c
UTF-8
371
2.9375
3
[]
no_license
#include <Polynomail.h> void AddPolynomial(const Polynomial Poly1, const Polynomial Poly2, Polynomial PolySum) { int i; ZeroPolynomial(PolySum); PolySum->HighPower = Max(Poly1->HighPower, Poly2->HighPower); for(i = PolySum->HighPower; i >= 0; i--) { PolySum->CoeffArray[i] = Poly1-...
true
a21549be7cd65bdcbcd37d14892ee405b8ad8257
C
moneytech/pinevm
/src/main.c
UTF-8
883
3.046875
3
[ "MIT" ]
permissive
#include "../include/options.h" #include <getopt.h> static struct option long_opts[] = { {"execute", required_argument, NULL, 'e'}, {"version", no_argument, NULL, 'v'}, {"help", no_argument, NULL, 'h'} }; int main(int argc, char *argv[]) { int opt; int retcode = 0; extern char *...
true
79c1f860777c88c505ead3f361d43b489740152b
C
smmills/Kepler-223_Migration_Code
/kepler_equation.h
UTF-8
525
2.84375
3
[ "MIT" ]
permissive
// Written by Cezary Migazewski - Last Edit 1/1/16 my_float kepler_equation (my_float e, my_float M) { my_float E, E0, f0, f1, f2, f3, d1, d2, d3, delta, nu; int i; E = M; delta=1; i=0; while ((delta>1e-8) && (i<100)) { ++i; E0=E; f0=E-e*sin(E)-M; f1=1-e*cos(E); f2=e*sin(E); ...
true
cb0d704c4c341fa72f986c1275977e57c08d57fd
C
arknan/cs50
/old/pset1/credit.c
UTF-8
2,270
3.71875
4
[]
no_license
#include<cs50.h> #include<stdio.h> #include<math.h> int sum_of_digits(long long number, long long odd_or_even); int even_addition(int digit); int get_digits(long long number, long long loop, int decision); int main(void) { printf("Please enter a credit card number \n"); long long number = get_long_long(); ...
true
8cf02e542538b68b012af244f6d8e73b98b32799
C
moonsung1234/DataStructure
/string/practice/practice01.c
UTF-8
391
3.234375
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <string.h> char* readLine(char* buffer) { char c; int i = 0; while((c = getchar()) != '\n') { buffer[i++] = c; } buffer[i] = '\0'; return buffer; } int main(void) { char buffer[100]; while(1) { printf("$ "); readLine(buffer)...
true
47b4861c44e51a6de344b13564aa20125dee5acd
C
TheArduinoBoy/VisualOS
/src/kernel/scheduler/scheduler.h
UTF-8
2,472
2.734375
3
[ "MIT", "CC0-1.0", "BSD-2-Clause" ]
permissive
/* * File: scheduler.h * Description: The main scheduler * ***************************************************************************** * Copyright 2021 Scott Maday * Check the LICENSE file that came with this program for licensing terms */ #pragma once #include "x86_64/isr.h" #define SCHEDULER_QUEUES_NUM _S...
true
fb77f856fd59c27dec0c29ddbee83121c1511d0f
C
toancqb/Corewar
/libft/src/ft_lltoa_base.c
UTF-8
1,571
2.984375
3
[]
no_license
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_lltoa_base.c :+: :+: :+: ...
true
5c2f3681944fea75223e6704b6827e2b4e7e5cca
C
SeckMohameth/holbertonschool-low_level_programming
/0x07-recursion/4-pow_recursion.c
UTF-8
281
3.484375
3
[]
no_license
#include "holberton.h" /** *_pow_recursion - return value f x raised to power y *@x: x value *@y: value being raise to *Return: returns int **/ int _pow_recursion(int x, int y) { if (y < 0) return (-1); if (y == 0) { return (1); } return (x * _pow_recursion(x, y - 1)); }
true
e2db7a8bfd038cfa8017d2ca0d4761cff91cb03a
C
EBI-Metagenomics/imm
/list.h
UTF-8
1,600
2.75
3
[ "MIT" ]
permissive
#ifndef IMM_LIST_H #define IMM_LIST_H #include "api.h" #include "container.h" #include <stdbool.h> struct imm_list { struct imm_list *next; struct imm_list *prev; }; IMM_API void imm_list_init(struct imm_list *list); IMM_API void imm_list_add(struct imm_list *neu, struct imm_list *head); IMM_API void imm_list_de...
true
4c3544dbec6532f5bed940b11592fccf118babd0
C
polinarudenco/Polina-Rudenko
/ind_lt_neg.c
UTF-8
190
2.953125
3
[]
no_license
#include "ind_lt_neg.h" int ind_lt_neg(int a, int arr[100]) { int x = 0; for (int i = 0; i > a; i++) { if (arr[i] < 0) { x = i; } } return x; }
true
64994d6bf6635f9cbef069670e914b69fa081ab1
C
barbutech/PSU_minishell1_2019
/src/my_getenv.c
UTF-8
776
2.984375
3
[]
no_license
/* ** EPITECH PROJECT, 2019 ** minishell1 ** File description: ** my_getenv.c */ #include <unistd.h> #include <stdlib.h> #include "../include/structures.h" #include "../include/my.h" char *my_getenv(name_t *value, name_t *name, char *elem, char **command) { char *path; int count = 0; char **pathes; ch...
true
747ae5afe788e23359f6938639d1c946d3a1f73f
C
AnujKumarsla/C-
/All Prev/c programms/string/wordcounter.c
UTF-8
441
3.484375
3
[]
no_license
#include <stdio.h> #include <conio.h> #include <stdlib.h> int wordcount(char s[],int x) { int n=0; if(s[0]!='\0') { for(int i=0;i<x && s[i+1]!='\0';i++) if(s[i]==' '&& s[i+1]!=' ') n++; n=s[0]==' '?n:n+1; } return n; } int main() { char s[100]; pr...
true
cb3a4562c3b1eeeb006f497926d34f8aaff09271
C
irvinecubesat/toolchain-arm-linux
/arm-unknown-linux-uclibcgnueabi/sysroot/usr/include/polysat/config.h
UTF-8
5,072
2.5625
3
[]
no_license
/** * Header file for config file management. * @author John Bellardo */ #ifndef CONFIG_H #define CONFIG_H #include <stdlib.h> #include <stddef.h> #ifdef __cplusplus extern "C" { #endif typedef void *(*CFG_parseCB_t)(const char *key, const char *value, void *data, void *p1, void *p2); struct CFG_ParseCB { ...
true
dbc40dd55324ff89018214c6243ffafac3c79ea7
C
jimingkang/news5pv210
/doc/lecture/zhulaoshi/code/4.C语言高级专题/4.5.ArrayStringSturctUnionEnum/4.5.12.union.c
UTF-8
1,321
3.984375
4
[]
no_license
#include <stdio.h> // 共用体类型的定义 struct mystruct { int a; char b; }; // a和b其实指向同一块内存空间,只是对这块内存空间的2种不同的解析方式。 // 如果我们使用u1.a那么就按照int类型来解析这个内存空间;如果我们使用u1.b那么就按照char类型 // 来解析这块内存空间。 union myunion { int a; char b; }; typedef union xx { int a; char b; double c; }XXX; union test { int a; float b; }; int main(void)...
true
88d7c0df6269b50d1b2e85c83d64c2268b2369d2
C
latifkabir/Computation_using_C
/power_rule/power_rule.c
UTF-8
35,855
2.578125
3
[]
no_license
# include <stdlib.h> # include <stdio.h> # include <math.h> # include <time.h> # include <string.h> int main ( int argc, char *argv[] ); char ch_cap ( char ch ); int ch_eqi ( char ch1, char ch2 ); int ch_to_digit ( char ch ); int file_column_count ( char *input_filename ); int file_row_count ( char *input_filename ); ...
true
bd4617ef8b330e35592602bb6745066169902bf4
C
danhpbt/dictdroid
/app/src/main/cpp/LzmaRamDecode.h
UTF-8
1,122
2.796875
3
[]
no_license
/* LzmaRamDecode.h */ #ifndef __LzmaRamDecode_h #define __LzmaRamDecode_h #include <stdlib.h> /* LzmaRamGetUncompressedSize: In: inBuffer - input data inSize - input data size Out: outSize - uncompressed size Return code: 0 - OK 1 - Error in headers */ int LzmaRamGetUncompressedSize( ...
true
284343b4fae951b4700d851b4b82d31cf7bed3fd
C
sonushahuji4/Data-Structure-Algorithm-Using-C
/Data Structure & Algorithm Using C/Queue/Queue/Q_array_circular.c
UTF-8
2,125
3.3125
3
[]
no_license
#include<stdio.h> #define Max 10 int Q[20]; int front=-1,rear=-1,data; void exit(); void insert_Q() { if(front==0 && rear==Max-1) { printf("\n\t\t\t!......Q_Overflow......!\n"); } else if(front!=0 && rear==Max-1) { rear=0; printf("\n\t\t\tEnter data:"); scanf("%d",&Q[rear]); rear=...
true
90893da33e2f6ae7ba4ff9607ab56b8e0c5f315d
C
0x705h/fmtribe
/test/fm/fm.c
UTF-8
2,250
2.734375
3
[]
no_license
/* * FM hello world * based on Programming the AdLib/Sound Blaster FM Music Chips * http://www.shipbrook.net/jeff/sb.html * * Tested with djgpp and DOSBox */ #include <stdlib.h> #include <stdio.h> #include <time.h> #define ADDR_PORT 0x388 #define DATA_PORT 0x389 typedef char* string; void outb(const int port...
true
a039fe6daaa63b6ad6fb761d3cad5cb3de7bf101
C
StevenHD/LibEvent_hlhd
/funcs/event_priority.c
UTF-8
1,007
2.71875
3
[]
no_license
// // Created by hlhd on 2021/5/7. // #include "../all.h" void stdInCallbackEP(evutil_socket_t fd, short what, void* arg) { char buf[1024]; printf("stdin_callback start %s\n", (char*)arg); int ret = read(fd, buf, sizeof(buf)); buf[ret] = '\0'; printf("buf is %s\n", buf); printf("stdin_callback...
true
e4db8cab9e30d7965ef9908f3176b37e14baeaaa
C
github188/SmartCamera
/source/dfrobot_test/cloud/n1/include/NkUtils/assert.h
GB18030
1,851
2.703125
3
[]
no_license
/** * Ŀʹõĺ궨塣 */ #include <NkUtils/types.h> #include <NkUtils/log.h> #include <string.h> #ifndef NK_ASSERT_H_ #define NK_ASSERT_H_ NK_CPP_EXTERN_BEGIN /** * ʱ㡣 */ #define NK_CHECK_POINT() \ do {\ NK_PChar file = strrchr(__FILE__, '/');\ printf("\r\n-- @ %s:%d \r\n\r\n", !file ? __FILE__ : file + 1, __LINE...
true
42d389f3b1623dd499fb1c0d65147998e179babf
C
Genskill2/06-ari-Vishnuprasad522
/ari.c
UTF-8
1,411
3.328125
3
[]
no_license
#include <stdio.h> #include <ctype.h> #include <stdlib.h> #include <cs50.h> string ari(string s) { string grade; float chara = 0, word = 0, sentence = 0; for(int i = 0; i<strlen(s); i++) { if(isalnum(s[i])) { chara = chara + 1; } if(s[i]==' ') { word = word +1; } ...
true
8f75f7a5c38f34690fef6f0c27ae962d11d49ab9
C
Carlosdc206/Sum-13-Banco
/Sum #13.c
UTF-8
4,289
3.1875
3
[]
no_license
#include<stdio.h> #include<math.h> #include<stdlib.h> #define cuenta 472395814 //FUNCION DEPOSITO float depo(float capital,float d){ float saldo; capital+=(capital*0.0125)+d; return(capital); } //FUNCION RETIRO float ret(float capital,float retiro){ float saldo; capital=capital-retiro; ...
true
5593631e92bc719d8df921a305f0750e810081ab
C
Ankit-SIT/FDS_Lab
/Assignment1/part2.c
UTF-8
3,694
3.90625
4
[]
no_license
// made by Ankit Das // on 15 July 2020 // tested on gcc 8 #include<stdio.h> #include<stdbool.h> #include<stdlib.h> int MAX = 0; void display(int *array) { int i = 0; printf("\n"); for(i = 0; i < MAX; i++) printf("%d ",*(array + i)); printf("\n"); } void insert(int *array, int ...
true
cd9bb39f9872147fce319f0178f870cfffb09308
C
chaoskagami/libbinmod
/bflag.c
UTF-8
3,072
2.8125
3
[ "MIT" ]
permissive
/* bgrep - A binary grep tool. */ #include "blib.h" #define IMAGE_FILE_LARGE_ADDRESS_AWARE 0x20 int flip_pe_la_flag(char* name) { map_file(name, WRITE_FILE); if( CH_BUF(0) != 'M' || CH_BUF(1) != 'Z' ) goto invalid_ret; // MZ header missing. uint32_t pe_loc = U32_BUF(0x3C); if ( U32_BUF(pe_loc) != 0x4550 ) ...
true
aea9f3494659b63f754f72cf9f82b3fa6b485ab6
C
diogomfreitas/pySBFL
/136-A/136-A-bug-17216301-17216311/136-A.c
UTF-8
289
2.734375
3
[]
no_license
#include <stdio.h> #include <string.h> int main(int argc, char *argv[]){ int n,i; int x; scanf("%d", &n); int pre[n]; for(i=0; i<n; i++){ scanf("%d", &x); pre[x-1]=i+1; } for(i=0; i<n; i++){ printf("%d", pre[i]); } return 0; }
true
f59f7a329aa5afc7f70ca3d17922fb31824027aa
C
gracebae0123/ESC180
/C/lab6/arrayaddresses.c
UTF-8
288
3.828125
4
[]
no_license
#include <stdio.h> int main(){ int a[10]; a = {1,2,3,4,5,6,7,8,9,10}; int i; printf("the size of an integer in my version of C is %d\n",sizeof(int)); printf("a is %d\n",a); for (i=0;i<10;i++){ printf("the ADDRESS of a[%d] is %d\n",i, &(a[i])); } return 0; }
true
480875ac83325cebf077a7140e60d863e3b077cb
C
GauthierLi/Cplus
/源文件/day1-3/dm11_字符翻转.c
GB18030
394
3.265625
3
[]
no_license
#include "stdlib.h" #include "stdio.h" #include "string.h" void inverseArr(char *myArr){ char *p1 = NULL; p1 = myArr; if(*p1 == '\0' || p1 == NULL) return; inverseArr(p1+1); //˴ȲִУջȳ printf("%c",*p1); } int main(){ char *p1 = "avsbfgsfg"; int len1 = strlen(p1); inverseAr...
true
b873964b7f8e0d1c6275a112b9e7533b1f67b1f5
C
kuklinski7985/hw3_APES
/pthread_ex.h
UTF-8
969
2.671875
3
[]
no_license
/** * @file pthread_ex.h * @brief function definitions for threading example in hw3 * @author Andrew Kuklinski * @date 02/18/2018 **/ #include <pthread.h> #include <stdio.h> #include <stdlib.h> extern pthread_mutex_t locking; //struct to be used to pass information between threads typedef struct{ int member1; ...
true
5c2ba15ac2d02d2b8c0129e04941d7ae524f6704
C
pkowieski/cwiczenia
/histogram - woda.c
UTF-8
785
3.34375
3
[]
no_license
#include <stdio.h> #define MAX(x, y) ( ((x) > (y)) ? (x) : (y)) #define MIN(x, y) ( ((x) < (y)) ? (x) : (y)) #define N 7 int policzWode(int *histogram); int main(){ int histogram[N] = {3, 5, 4, 2, 1, 7, 2}; printf("Maksymalny stan zgromadzonej wody wynosi %d.\n", policzWode(histogram)); return 0; } in...
true
51a44703f407b388e2989669d3e9da5132e4d7a9
C
ManiacMaxo/C-CPP
/C/strlen.c
UTF-8
850
3.921875
4
[]
no_license
// ------------------------------------------------------------------------ // NAME: Victor Gorchilov // CLASS: 11a // NUMBER: 8 // PROBLEM: #1 // FILE NAME: strlen.c (unix file name) // FILE PURPOSE: creating strlen without use of library // ------------------------------------------------------------------------ #in...
true
2c3251b638481b029178ce72656c94badfcbf9cc
C
maheshbabugorantla/ECE264_C_Programming_Assignments
/PA10/answer10.c
UTF-8
18,811
3.453125
3
[]
no_license
#include<stdio.h> #include<stdlib.h> #include<string.h> #include<math.h> #include"answer10.h" #include<strings.h> #include<inttypes.h> char** explode(const char* str, const char* delims,int* arrLen) { int num_delim = 0; // No. of delimiters in the string 'delims' int str_index = 0; // String Index // This Below lo...
true
7c769ada42850842ab20ffccbec783cb66b66293
C
mwoitek/leetcode-c
/getDecimalValue.c
UTF-8
702
3.84375
4
[]
no_license
/* * Definition for singly-linked list: * struct ListNode { * int val; * struct ListNode* next; * }; */ #include <math.h> int countNodes(struct ListNode* head) { int count = 0; struct ListNode* current = head; while (current != NULL) { count++; current = current->next; } return count;...
true
404b0472b381d335a72b24c31bfb2320c92cd4cb
C
Tr3v1n4t0r/holbertonschool-low_level_programming
/0x07-pointers_arrays_strings/4-strpbrk.c
UTF-8
508
3.484375
3
[]
no_license
#include "holberton.h" /** *_strpbrk - searches a string for bytes * *@s: string *@accept: string * *Return: a pointer to s or NULL */ char *_strpbrk(char *s, char *accept) { int i, j, pos, flag = 0; for (i = 0; s[i] != '\0'; i++) ; pos = i; for (i = 0; accept[i] != '\0'; i++) { for (j = 0; s[j] != '\...
true
55f735f471d03181ab822d30512c523a34f762bb
C
Busso00/APA_Lab_2020_2021
/Soluzioni/L10/E03/invArray.c
UTF-8
1,844
2.890625
3
[]
no_license
#include "invArray.h" typedef struct tabinv{ inv_t* vettInv; int nInv; }tabInv_t; tabInvP invTinit()//inizializza il wrapper per l'inventario { tabInvP tabInv; tabInv=(tabInv_t*)malloc(sizeof(tabInv_t)); tabInv->nInv=0; return tabInv; } inv_t* sObjL1(tabInvP tabInv,int f) { return &(tabIn...
true
9f2511a8af7ddcb42a95a494c6129d430c2cd560
C
mukeshsinghmanral/C-data-structures-and-Graphics-Program
/ds practice programs/42342.c
UTF-8
1,340
3.796875
4
[]
no_license
#include<stdio.h> #include<stdlib.h> struct node{ int data; struct node *link; }; struct node *create(struct node *,int); void traverse(struct node *); void exit(); int main(){ struct node *start=NULL; int choice,n; printf("\t\t\t\t\t\t\t\t\t\t\t CREATION AND DISPLAY OF LINKED LIST"); printf("\n\n\n\n\...
true
5f2c236ce49aebaf4afca00c422c341f284f122f
C
kavi0310/kaviplayerset4
/p31.c
UTF-8
319
3.109375
3
[]
no_license
#include<stdio.h> int main() { char a[100]; int b1=0,c1=0,d1=0,e1=0,f1=0,g1=0,i; scanf("%s",&a); for(i=0;a[i]!='\0';i++) { if(a[i]=='{') b1++; else if(a[i]=='[') c1++; else if(a[i]=='(') d1++; else if(a[i]=='}') e1++; else if(a[i]==']') f1++; else g1++; } if(b1==e1&&c1==f1&&d1==g1) printf("yes"); else printf("no"); }
true
71ef6c7bb7a30bd17c80cd90ef91ab4a0b459cdf
C
manthanmkulakarni/unixProgramming
/cppconst.c
UTF-8
174
2.578125
3
[]
no_license
#include<stdlib.h> #include<locale.h> int main(){ setlocale(LC_ALL,NULL); printf("File is %s\nDate %s\nTime %s\nLine %d\n",__FILE__,__DATE__,__TIME__,__LINE__); return 0; }
true
4cd0838fa1be6316e097e5b50bf1d7300cb45cc0
C
dareofmeashwani/College-Work
/computing lab 1/assign3_16CS60R62/mymkdir.c
UTF-8
1,965
3.265625
3
[]
no_license
#include<stdio.h> #include<stdlib.h> #include<unistd.h> #include<sys/types.h> #include<pwd.h> #include<string.h> #include <dirent.h> #include <errno.h> int checkdir(char *directory) { DIR* dir = opendir(directory); if (dir) { /* Directory exists. */ closedir(dir); return 1; } else if (ENOENT == errno...
true
8e58674c7dd655870898465f764fb83d1fb45a5c
C
qxcodeed/fractais
/fractais/prof/frac_dragao.h
UTF-8
513
2.84375
3
[]
no_license
#include "lib/pen.h" enum opcao{vai = 1, volta = -1}; void dragao(Pen &p, float tam, int n, opcao op, float desl){ if(n == 0){ p.walk(tam); return; } dragao(p, tam, n - 1, vai, desl - 10); p.right(90 * op); dragao(p, tam, n - 1, volta, desl + 10); } void frac_dragao(){ Pen pen...
true
02e20b0fb9a95ff6e47eb8e73c3f1729472680c1
C
jrbarrio/FundamentosProgramacionI
/18. Metodos de ordenacion de estructuras lineales/insercion/main.c
UTF-8
785
3.859375
4
[]
no_license
#include <stdio.h> #define TAMANIO 20 void imprimir(int* elemento); void ordenar(int* elemento); void main (void) { int elemento[] = {16, 20, 9, 7, 10, 6, 11, 2, 12, 8, 14, 1, 15, 5, 17, 3, 18, 13, 19, 4}; imprimir(elemento); ordenar(elemento); } void imprimir(int* elemento) { int i; for (i = 0; i < TAMA...
true
571d8e83ffc63d03928a91d48fdc183f2586a945
C
joan8ruth/NCRWork
/C/Assignment5/Question10/Question10/main.c
UTF-8
424
2.703125
3
[]
no_license
#include<stdio.h> #include<stdlib.h> #include<string.h> void main() { FILE *fp,*fp1; int d; char c[20],s[20],t; fp = fopen("fileA", "a+"); printf("Enter the country\n"); scanf("%s", s); while (fscanf(fp, "%20s", c)==1) { if (strcmp(strupr(s), strupr(c)) == 0) { fseek(fp, ftell(fp) + 1, SEEK_SET); ...
true
568867d11bc1e1a5f12c4cc0ae4fc80838c10b80
C
1abhi23/c-programming-1
/13/13.11-average-word-length.c
UTF-8
1,670
3.921875
4
[]
no_license
#include <stdio.h> #include <stdbool.h> #include <ctype.h> double compute_average_word_length(const char *sentence); int main(int argc, char *argv[]) { if (argc != 2) { fprintf(stderr, "Usage: %s \"Enter a sentence in quotes.\"\n", argv[0]); return 1; } printf("%.2f\n", compute_average_word_length(argv...
true
e55f71d1b0957c0430d423050e25fd65ecefdacc
C
ckchow/deep_ascii_soccer
/teams/archive/gboone/main.c
UTF-8
8,816
3.34375
3
[]
no_license
/*=========================================================================== gary.c This team forms a loose pattern once the ball is aquired. The robot that finds the ball is the captain. The others flank him diagonally, hoping to catch the kicks of the opposing team. Gary Boone gboone@cc.gatech...
true
0d64b59b22572715a857b9ba725325a8dcdff213
C
lonellliburd/triangleproblem
/triangleproblem.c
UTF-8
4,602
3.453125
3
[]
no_license
# include <stdio.h> # include <stdlib.h> # define MAX 100 //The Binary Counter function takes an Array and size n as its //parameters. It traverses the Array from right to left and //increments the value by 1. void binCounter(int A[], int n){ int i; for (i=n-1; i>=0; i--){ if (A[i]==0){...
true
9775083b1bac225ba1b39fcda8c3cc5f065dd3d7
C
isabella232/AnghaBench
/source/git/builtin/extr_branch.c_calc_maxwidth.c
UTF-8
1,379
2.515625
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
4a73010a7f6e63282a9b3e0581615fde08939013
C
ShelleyRuirui/AbstractionsInC
/basic/Chap2/testRecord.c
UTF-8
348
3.609375
4
[]
no_license
#include<stdio.h> int main() { typedef struct{ int i; int j; } posT; posT pos1; pos1.i=1; pos1.j=2; printf("The i is %d\n",pos1.i); //Pointers should first be initialized here or segment fault posT pos2; posT *ppos=&pos2; ppos->i=3; printf("The i is %d\n",ppos->i); printf("The j is ...
true
54e72309a070694a1ee7aae71db218685d7859a2
C
saikishor/game_of_life
/init.c
UTF-8
6,200
3.09375
3
[]
no_license
#include <stdio.h> #include <ncurses.h> #include <stdlib.h> #include <time.h> #include <ncurses.h> #include <unistd.h> int initall(void) { initscr(); return 0; }; int enditall(void) { endwin(); return 0; } // Init a cell matrix with zeros CellMatrix* Init_matrix(int n_rows, int n_cols) { struct CellMatrix*...
true
38a339981ffd79f536d81830d90546f8a4c8acfa
C
Antony-guzman/maze_server_project
/set.c
UTF-8
5,705
3.578125
4
[]
no_license
/* * Sean Keough * GitHub: SKeough117 * * set.c - CS50 'set' module * * see set.h for more information. * * Sean Keough, January 2020 * */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include "set.h" #include "memory.h" /******************* file-local global variables ****************/ /* no...
true
0cc19347272144cbfbe8836b068ba6c3aed93362
C
osuvic/CS362-004-U2017
/projects/wangv/sooreectDominion/unittest4.c
UTF-8
1,418
2.796875
3
[]
no_license
#include "dominion.h" #include "dominion_helpers.h" #include <string.h> #include <stdio.h> #include <assert.h> #include "rngs.h" int main(){ int i; int k[10] = {adventurer, council_room, feast, gardens, mine, remodel, smithy, village, baron, great_hall}; int tempCount; int actualCoun...
true