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
7f5aff23cedb942fb448bd7f439a45d97b182fd8
C
Mugurell/Learning
/C/Gookin_CAIO/book 3 - Above/dshell.c
UTF-8
582
3.203125
3
[ "Unlicense" ]
permissive
#include <stdio.h> #include <string.h> void showprompt(void); /*prototype*/ int main() { char input [64]; do { showprompt(); /*call the function*/ gets(input); puts("Someday I must implement that function.."); } while((strcasecmp)("quit" ,...
true
e0ee20e3f492b4bff667eff5df0f51470143ddbe
C
DK-afei/c
/实验8/二/10 - 副本.c
UTF-8
822
3.515625
4
[]
no_license
#include <stdio.h> #include <stdlib.h> void MatrixSearch(double **a, double*pMax, double*pMin,int n) { int i,j; *pMax=*pMin=*(*(a+0)+0); for(i=0;i<n;i++) { for(j=0;j<n;j++) { if(*(*(a+i)+j)>*pMax) *pMax=*(*(a+i)+j); if(*(*(a+i)+j)<*pMin) ...
true
cabf709f204a5f732e29e73485b3a80aa662a6fd
C
kulkarniprerana5464/The-C-programming
/anil/chapter-1/20.c
UTF-8
1,389
4.0625
4
[]
no_license
/* Exercise 1-20. Write a program detab that replaces tabs in the input with the proper number of blanks to space to the next tab stop. Assume a fixed set of tab stops, say every n columns. Should n be a variable or a symbolic parameter? */ #include <stdio.h> #define MAX_LINE_LEN 1025 #define TAB_SIZE 8 int Getline(ch...
true
a5504e0dac647f40733b9e84df7b6642a64bee9b
C
roseen/Lab1
/Lab1/filterWords.c
UTF-8
496
2.640625
3
[]
no_license
// // filterWords.c // Lab1 // // Created by Amanda Rosén on 2014-12-26. // Copyright (c) 2014 Amanda Rosén. All rights reserved. // #include "filterWords.h" int filterWords(char (*array_importantwords)[60],StackAddress strStack,int array_length) { int i; for (i=0; i<=array_length; i++) { if (exi...
true
6dd992505d0b6b968df530087ae04ebadb419eb3
C
Tlny/DarkeLIB
/mudlib/d/1tlny/working/areas/tara/rooms/tvn.c
UTF-8
3,333
2.53125
3
[]
no_license
inherit ROOM; #include <dirs.h> #include <std.h> #include "/wizards/shanus/defs/tara.h" void init() { ::init(); add_action("read", "read"); } void create() { ::create(); set_property("light",2); set_property("night light",2); set_property("indoors", 1); set_short("Tara's Tavern"); set("day long"...
true
e135d6216b087f3a5cea66c7acec7c2eafb6357e
C
isaac-jordan/Lisk
/server/src/Server.c
UTF-8
3,815
3.46875
3
[]
no_license
/* A LAN Risk Server * ----------------- * Usage ./server PORT_NUMBER * * If no port number given, uses DEFAULT PORT * * Author: Ewan McCartney */ #include "Server.h" /* Small function to print out errors over stderr. * Program terminates once message printed */ void error(const char *msg) { ...
true
00f28898821d0575bcd927c4f6206ef9edd264d6
C
Ruwhaaa/Architect
/lib/my/my_fill_str.c
UTF-8
237
3.484375
3
[]
no_license
/* ** EPITECH PROJECT, 2017 ** my_fill_str ** File description: ** fill a str with '\0s' */ char *my_fill_str(char *to_fill, int len) { int index = 0; while (index < len) { to_fill[index] = '\0'; index++; } return (to_fill); }
true
0395ae6137b1eb4c003dde57b82a4554e0441df1
C
BITCODER10/DecimalToBinary
/main.c
UTF-8
760
4.125
4
[]
no_license
#include <stdio.h> #include <stdlib.h> int BinaryConversion (int User_Input) { int Original = User_Input, Remainder, arr[10], count =0, i; while(User_Input>0){ Remainder = User_Input%2; User_Input = User_Input/2; arr[count++] = Remainder; } printf("\n Binary of number...
true
1208bb7facd55332c7427587a3eacaca188aba18
C
FelipeABortolini/Exercicios_C
/PROBLEMAS FEITOS/Semana 7/Problema 34/Resposta.c
ISO-8859-1
1,315
4.09375
4
[ "MIT" ]
permissive
/*Faa um programa em C que leia um vetor contendo n valores no intervalo [0,9], sendo n fornecido pelo usurio. Aps obter o vetor, faa com que o seu vetor apresente a sada conforme abaixo: vetor de entrada: [9,2,3,4,5] sada esperada: 81, 18, 27, 36, 45, 18, 4, 6, 8, 10, 27, 6, 9, 12, 15, 36, 8, 12, 16, 20, 45, 10, 15...
true
26b2f74de8961e32281730cca76c58437ae253fb
C
Henni16/SUACA
/src/dependency_analysis.c
UTF-8
10,903
2.578125
3
[ "Apache-2.0" ]
permissive
#include "dependency_analysis.h" #include "inst_list.h" #include "graph.h" reg_map_t *compute_dependencies(single_list_t *list) { reg_map_t *map = newMap(xed_reg_enum_t_last()); xed_decoded_inst_t *instructions = list->array; xed_decoded_inst_t xedd; for (size_t i = 0; i < list->size; i++) { ...
true
0e60aff7d3376b6e6d8898d717cff04c6b000c45
C
BytePredator/smsqueue
/sms_queue/sms_send.c
UTF-8
2,306
2.984375
3
[]
no_license
#include<stdio.h> #include<stdlib.h> #include<unistd.h> #include<string.h> #include<time.h> #include<sys/ipc.h> #include<sys/msg.h> #include<sys/wait.h> #include<sys/errno.h> extern int errno; // error NO. #define PIDFILE "/var/run/smsd.pid" // PID file #define MSGPERM 0600 // msg queue permission #define M...
true
840b3396ac6acd711ceed419a6bc4167115e0513
C
prolaymukherjee/URI
/URIcode/linerssssssssssssssssssssssssssss.c
UTF-8
397
3.59375
4
[]
no_license
#include<stdio.h> int arr[10]={9,8,0,1,7,5,2,3,6}; int size=10; int print(){ int i=0; for(i=0;i<size;i++){ printf("%d | %d \n",i,arr[i]); } } int liner(int val){ int i=0; printf("%d is the value of index is:",i); for(i=0;i<size;i++){ if(arr[i]==val){ printf("%d",val); ...
true
0ca461ff16d73120a609de29680261fc80a31876
C
SCOTTY0101/Arduino-Blink
/Arduino-led-pin13.c
UTF-8
578
3.484375
3
[]
no_license
/* *LED blink using PIN 13 (connect positive side of led), 220 ohm resistor (stops led from overloading and burning out!!!), GND. */ //Set up function of LED pin 13. //int: Integers are whole numbers in the C language. int led = 13; void setup() { pinMode(13, OUTPUT); } //Set up LED on pin 13, with loop ...
true
af4706ec62db40a5c3f0bb8ae90da9e1bdd8bc33
C
ciaoSora/DatabaseFreshman
/db/epinions_1.c
UTF-8
1,219
2.96875
3
[ "MIT" ]
permissive
/* Database "epinions_1" contains tables: item review trust useracct */ #ifndef EPINIONS_1 #define EPINIONS_1 struct T_item { double item_id; char title[12]; }; struct T_review { double a_id; double user_id; // --> useracct.user_id double item_id; // --> item.item_id double rating; double rank; }; struct...
true
7872dd59838ac62eba463889952e62f57f58eaae
C
dkvdec/FdF
/src/check_map.c
UTF-8
2,362
2.53125
3
[]
no_license
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* check_map.c :+: :+: :+: ...
true
411d2c427eaa2685092074a2f6e4ac8b5acdda5f
C
vendu/velho
/usr/lib/mt/mtx.c
UTF-8
2,598
2.890625
3
[ "BSD-3-Clause" ]
permissive
/* REFERENCE: http://preshing.com/20120305/implementing-a-recursive-mutex/ */ #if defined(ZEROMTX) && !defined(PTHREAD) #include <stdlib.h> #include <zero/asm.h> #include <zero/thr.h> #include <zero/mtx.h> zeromtxatr * zeroallocmtxatr(void) { zeromtxatr *atr = malloc(sizeof(zeromtxatr)); if (atr) { a...
true
fd95e732a58cbe70029caa2e95bdb37e0976c8fa
C
ssmaestro/first_example
/tempCodeRunnerFile.c
UTF-8
87
2.765625
3
[]
no_license
printf("\nEnter the direct path distance between node %d and %d: ", i, j);
true
421b953b2098e1ed996b68e40edb2d17759f2c44
C
jhl0204/DNAMIC-Arduino-Software-Programs
/Continous_Cue_Training/CC/r_port_operate.h
UTF-8
4,058
2.5625
3
[]
no_license
/*--------------------------------------------------------++ || Operate Left Port || ++--------------------------------------------------------*/ // HAVE TO KEEP COMPONENTS RUNNING INDEPENDENTLY (ON / OFF) // ORDER OF THIS MATTERS!! IF NOT IN THE FOLLOWING ORDER, nosepoke will NOT...
true
1a44963c84224b170e64742f9709a3ac6fbff84e
C
kilkucom/ReLokacja_Latarnie
/permutacje-par.c
UTF-8
1,644
2.90625
3
[]
no_license
#include <stdio.h> #include <locale.h> #include <glib.h> #include <glib/gstdio.h> // gcc -o permutacje-par permutacje-par.c `pkg-config --libs --cflags glib-2.0` gchar* duza(const gchar* param) { gchar *name; int i,len; glong dlug; g_return_val_if_fail(param != NULL, NULL); name = g_strdup(param); /* capit...
true
cdd0af67b615ab40398b54ddd3f2964e223965be
C
Houssam-dev974/TEK1
/AIA_n4s_2019/src/get_command.c
UTF-8
816
2.6875
3
[]
no_license
/* ** EPITECH PROJECT, 2020 ** command ** File description: ** cmd */ #include "../include/my.h" int my_command(char *str) { my_putstr(str); str = get_next_line(0); if (detect_stop_car(str) == 1) return (1); return (0); } int detect_stop_car(char *str) { int i = my_strlen(str) - 1, j = 0;...
true
c0c4e14ecb6d695c2ac2b54dfcee11556ecf8bc7
C
jvitasek/VUT-FIT-IFJ-Proj
/interpret/stack.c
UTF-8
1,654
3.53125
4
[]
no_license
#include "stack.h" void SInitP (tStackP *S) /* ------ ** Inicializace zásobníku. **/ { S->top = 0; } void SPushP (tStackP *S, int a ) /* ------ ** Vloží hodnotu na vrchol zásobníku. **/ { /* Při implementaci v poli může dojít k přetečení zásobníku. */ if (S->top==90) printf("Chyba: D...
true
d59ab52c1798f2652f1b9003b1a903bfba9ee46b
C
coryharrington/3100
/labs/lab1/lab1.c
UTF-8
204
3.203125
3
[]
no_license
#include <stdio.h> int main() { double i, sum, x = 0; while (scanf("%lf", &x) == 1) { sum += x; i++; printf("Total=%f Average=%f\n", sum, sum / i); }; return 0; }
true
7ea1a9cbee09c6b6e6934cc69b508c6bbeb95058
C
lucasbretana/AED
/EstruturasBasicas/tree.c
UTF-8
2,374
3.4375
3
[]
no_license
#include <stdio.h> #include <stdlib.h> typedef short TKey; typedef struct _Node{ TKey key; struct _Node *left, *right, *top; }Node; void insertNode(Node **root, TKey n); void removeNode(Node **root, TKey n); void listPreOrder(Node *Root); int High(Node *n); int FB(Node *n); void RSD(Node *n1, Node *n2); void RSE...
true
762aa4a5ffe4c15173e20241f55ff1c9b0b990b1
C
xXorAa/hxc-software
/HxCFloppyEmulator/AdfOpus_hxc/trunk/ADFOpusSrc/ADFLib/Test/del_test.c
UTF-8
2,220
2.796875
3
[]
no_license
/* * del_test.c */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include"adflib.h" void MyVer(char *msg) { fprintf(stderr,"Verbose [%s]\n",msg); } /* * * */ int main(int argc, char *argv[]) { struct Device *hd; struct Volume *vol; struct List *list; ...
true
695f7e986a69fccaf57cdcd7b27b815a3b89e1da
C
varmfskii/zxnext_tools
/zxother/fsplit/fsplit.c
UTF-8
1,687
3.046875
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
// fsplit.cpp : Defines the entry point for the console application. // #include <stdlib.h> #include "stdafx.h" #include <string.h> #define MAX_SPLIT 100 char *itoa(int, char *, int); int main(int argc, char* argv[]) { if ((argc < 3) || (argc > (MAX_SPLIT + 2))) { printf("File splitter by TS-Labs\n"...
true
0a8b9fbdbf966947bfe2fa3889e8856f939ae690
C
psammy007/aps2020
/tutorial.c
UTF-8
173
2.6875
3
[]
no_license
#include<stdio.h> int main(){ int v,n,i,t; scanf("%d%d",&v,&n); for(i=0;i<n;i++){ scanf("%d",&t); if(t==v) printf("%d",i); } }
true
0fe935c1c63127692a79878bea2b670595b667f6
C
alessandrods/dtka
/erasure_layer.h
UTF-8
1,890
2.625
3
[]
no_license
/******************************************************** ** Authors: Alessandro Di Stanislao, alessand.distanislao@studio.unibo.it ** Carlo Caini (project supervisor), carlo.caini@unibo.it ** ** ** Copyright (c) 2018, Alma Mater Studiorum, University of Bologna ** All rights reserved. ******...
true
810b008c22a6ab3f6a3a83cf456c870821a95a44
C
Qvasov/corewar
/assembler/libft/srcs/ft_printf/pf_wctoa.c
UTF-8
2,206
2.734375
3
[]
no_license
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* pf_wctoa.c :+: :+: :+: ...
true
1d887d01caa5d94a86a9db5d61988b7a8fcdd5f5
C
akshatkant/30-days-of-code
/largest.c
UTF-8
530
3.546875
4
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <math.h> void arraySum (int A[], int n){ int s=0; for(int i=0;i<n;i++) { s=s+A[i]; } printf("%d",s); } int main() { int n,i; int a[n]; printf("Enter the number of elements\n"); scanf("%d",&n); printf("Enter the elements...
true
1103b30b65d821b9d66242426eaf22662faa1500
C
danivenk/UVA_Minor-Programming_Programming-1
/Module-2_Arrays/Ex3-crack/crack.c
UTF-8
4,412
3.984375
4
[]
no_license
/* ** crack.c guesses the password (max 5 characters) when given a hash ** Dani van Enk, 11823526 */ // including the used libraries #include <stdio.h> #include <stdlib.h> #include <ctype.h> #define _XOPEN_SOURCE #include <unistd.h> #include <crypt.h> #include <string.h> // predefining the used functions char next_le...
true
c987e72dcc5b17eabbbb2f7b85fc607c98098f1d
C
neeraj11789/c-progamming
/quikr-20/smallest-missing-number-binary-search.c
UTF-8
1,556
4.09375
4
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <limits.h> /** Given a sorted array of n integers where each integer is in the range from 0 to m-1 and m > n. Find the smallest number that is missing from the array. Examples Input: {0, 1, 2, 6, 9}, n = 5, m = 10 Output: 3 Input: {4, 5, 10, 11}, n = 4, m = 12 Output: ...
true
37f4bf64a6f4a2d3ab20ee239d117595cb4c80e5
C
katearzate/Encriptacion_Desencriptacion
/KateTheRipper/KateTheRipper.c
UTF-8
2,947
3.53125
4
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> #define max 50 #define long_alfabeto 26 #define inicio_ascii_mayusculas 65 #define inicio_ascii_minusculas 97 const char *alfMinusculas = "abcdefghijklmnopqrstuvwxyz", *alfMayusculas = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; void importar...
true
bab9dbdf63d77e1e14e06750436ca83c0e53bef9
C
pusparajvelmurugan/sum
/spl.c
UTF-8
300
2.8125
3
[]
no_license
#include<stdio.h> int main() { char str[100]; countSpecialChar; int counter; countDigits=countSpecialChar; printf("Enter a string: "); scanf("%c",str); for(counter=0;str[counter]!=NULL;counter++) { if( countSpecialChar++) } printf("\nDigits: %d \nSpecial Characters: %d",countSpecialChar); return 0;
true
20043c29c3d160111b41ea743a8604c725e368e6
C
WaghAdi/C-Programing-Language
/Assignment_3_String/p24.c
UTF-8
914
3.171875
3
[]
no_license
#include <stdio.h> void main() { char str1[100]; char str2[100]; int i = 0, m = 0; int j = 0; int count = 0; int k = 0, choice; printf("Please Enter the first string "); // scanf("%s",str); // gets(str); fgets(str1, sizeof(str1), stdin); printf("Please Enter the second string...
true
43daf3ddcc8c720e673434bfab220da838c189fa
C
achrefbs/holbertonschool-low_level_programming
/0x1A-hash_tables/0-hash_table_create.c
UTF-8
475
3.484375
3
[]
no_license
#include "hash_tables.h" /** * hash_table_create - a function that creates a hash table. * @size : side of the hash table * Return: a pointer to the newly created hash table */ hash_table_t *hash_table_create(unsigned long int size) { hash_table_t *table; table = malloc(sizeof(hash_table_t)); if (table == NULL)...
true
66986352e1ff723e3a428f88b80c25c212176007
C
karinnalims/Programming-C
/vetor e funcao/vetor 4.c
UTF-8
392
3.40625
3
[ "MIT" ]
permissive
#include <stdio.h> main(){ int i,v[10],cont=0,conti=0; for(i=0;i<10;i++){ printf("digite os valores: "); scanf("%d",&v[i]); } for(i=0;i<10;i++) { if(v[i]>0){ cont++; } else{ cont=cont; } if(v[i]%2!=0){ conti++; } else{ conti=conti; } } printf("a quantidade de valores posi...
true
f7d0e720097b2880fe923c42e325fdfd901a34f0
C
gokkulasudanr92/CSC_501_Xinu_OS
/OS_PA1/csc501-lab1/sys/printsegaddress.c
UTF-8
626
2.796875
3
[]
no_license
#include <stdio.h> #include <lab0.h> extern unsigned long etext, edata, end; void printsegaddress() { kprintf("void printsegaddress()\n"); kprintf("\nCurrent: etext[0x%08x]=0x%08x, edata[0x%08x]=0x%08x, ebss[0x%08x]=0x%08x", &etext, etext, &edata, edata, &end, end); kprintf("\nPreceding: etext[0x%08x]=0x%0...
true
d7cb85e8d836f876271faac66f17adca6c2e6354
C
silveira24/C-Parser
/no-strict/ErrForLPar.c
UTF-8
83
2.890625
3
[ "Apache-2.0" ]
permissive
int main() { int i; for i=0; i < 3; i++){ printf("i: %d", &i); } return 0; }
true
690c25bc722d9d3a18f664af1b7f5a47d1bea500
C
AstridDELCROS/42_minishell
/src/subsystems/substitution/remove_backslash.c
UTF-8
1,872
2.984375
3
[]
no_license
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* remove_backslash.c :+: :+: :+: ...
true
071b65891191b05fc05f5e5d1da4aa154e0ff150
C
arunmani20/arun
/84.c
UTF-8
148
3.109375
3
[]
no_license
#include<stdio.h> void main() { char ch; printf("\n enter the character"); scanf("%c",&ch); printf(" ASCII value is %d",ch); }
true
9893f270a0943dd1bef51e3a50c4c0e6d87761eb
C
wendrul/minishell
/src/msh_parsing2.c
UTF-8
2,497
2.546875
3
[]
no_license
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* msh_parsing2.c :+: :+: :+: ...
true
4d1367d395aea6e434d1a3dec0f09eceda39162f
C
Jessinra/IF2220-Pseudo-Parser
/mesinkata.h
UTF-8
1,220
2.734375
3
[]
no_license
/* File: mesinkata.h */ /* Definisi Mesin Kata: Model Akuisisi Versi I */ #ifndef __MESINKATA_H__ #define __MESINKATA_H__ #include "boolean.h" #include "mesinkar.h" #define NMax 50 #define BLANK ' ' typedef struct { char *TabKata; int Length; } Kata; /* State Mesin Kata */ extern boolean EndKata; extern Kata...
true
77ced7e1a394322054d17e81827916e950efc045
C
mainuddin-rony/parallel-computing-a4
/Vector3.c
UTF-8
963
3.5
4
[ "BSD-3-Clause" ]
permissive
#include <stdlib.h> #include <math.h> #include "Vector3.h" Vector3 plusEquals(Vector3 *v1, Vector3 v2){ v1->x += v2.x; v1->y += v2.y; v1->z += v2.z; return *v1; } Vector3 minusEquals(Vector3 *v1, Vector3 v2){ v1->x -= v2.x; v1->y -= v2.y; v1->z -= v2.z; return *v1; } ...
true
650266d843fad9e77f38373da27408cb78b098a6
C
jinfal9/JinyoungHome
/공연/공연/main.c
UHC
630
3.1875
3
[]
no_license
#include <stdio.h> int main(void) { int test_case, T, i, len, dec, dec1, need, temp; char str[1002]; freopen("1_input.txt", "r", stdin); scanf(" %d", &T); for (test_case = 1; test_case <= T; ++test_case) { for (i = 0; i < 1002; i++) { str[i] = NULL; } scanf("%s", str); dec = str[0] - '0'; nee...
true
57076a43f2dde3c0fb26b96c917ea9ce23489c78
C
zumpchke/mit_os
/ex1.c
UTF-8
1,468
3.046875
3
[]
no_license
#include <stdio.h> #include <assert.h> #include <unistd.h> #include <sys/types.h> #include <sys/wait.h> #include <time.h> int main() { int ptoc[2]; int ctop[2]; pipe(ptoc); pipe(ctop); pid_t child; int count = 0; clock_t start = clock(); if ((child = fork...
true
40f9cea269bb3525cca25bdf95365749d6def9bb
C
massemanet/jungerl
/lib/esmb/c_src/test.c
UTF-8
682
2.96875
3
[]
no_license
#include "global.h" #include "md4.h" #define MD 4 #define MD_CTX MD4_CTX #define MDInit MD4Init #define MDUpdate MD4Update #define MDFinal MD4Final static void MDPrint (digest) unsigned char digest[16]; { unsigned int i; for (i = 0; i < 16; i++) printf ("%02x", digest[i]); } static void MDString (char...
true
e2e1538a405816a9e5d30dae8c1b9d96cbf985a5
C
MrLearningNow/MCU-1
/C51/项目 LCD时钟/项目改进 DS1302高精度时钟/test.c
UTF-8
1,035
2.578125
3
[ "MIT" ]
permissive
/******************************************************** * Author: Shawn Guo * * Date : 2013/2/15 * * Last : 2013/2/15 * * Project: LCD高精度时钟 * * 插入LCD1602, P1 | ...
true
e78099cd5ddd280d646b0b2b04ae8ff14baa854c
C
ttijani/Node-js
/practice/palindrome_c.c
UTF-8
615
3.421875
3
[]
no_license
#include "stdlib.h" #include "stdio.h" #include "string.h" int main () { char *str = "American"; char *str_temp = malloc (strlen (str) + 1); strlcpy (str_temp, str, strlen (str) + 1); char cur_char; char *temp = str_temp + (strlen (str_temp) * sizeof (char) - sizeof (char)); cur_char = *temp; while...
true
f51a060016756fb94ac34021ec9ae8fa66615596
C
daijiale/DaiJiale-ProfessionalNotes
/DaiJiale-C-Demo/C Studio/编程作业/4戴嘉乐2012221010021/附加.c
UTF-8
412
3.078125
3
[ "MIT" ]
permissive
#include <stdio.h> int main() { int i,n,m,p=0,j; printf("Enter the size:"); scanf("%d",&n); int a[99][99]={0}; a[0][(n-1)/2]=1; j=(n-1)/2; for(i=2;i<=n*n;i++) { p--; j++; if(p>=0) ; else p+=n; if(j<=n-1) ; else j+=(-n); if(a[p][j]==0) a[p][j]=i; else a[++p][j]=i; } for(i=0;i<n;i...
true
f7e84944014e840b1b639c8d9c0d338cb4c62bec
C
psi4/psi2
/src/bin/intder95/psipp/operator.c
UTF-8
1,024
3.34375
3
[]
no_license
/* Here are the special operators that psipp recognizes which are * not handled in parse.y. */ #include <stdio.h> #include <stdlib.h> #include "global.h" /* This returns true if the value of the two names are the same. If * one (or both) of the names is quoted, then the string with the * quotes removed is used ...
true
18f0a7b6dcb24d4ae5919c65c28dbfe328051a58
C
AlphaRaunaq/Compiler-Design
/P1.C
UTF-8
300
3.34375
3
[]
no_license
#include<stdio.h> void main(){ char str[10]; clrscr(); printf("Enter a string: "); scanf("%s", &str); if(str[0] == 'a'){ if(str[1] == 'b'){ printf("String is valid"); } else{ printf("String is invalid"); } } else{ printf("String is invalid"); } getch(); }
true
77e4c893487e948e958f2b504d95b32d18f93bbb
C
Jonimoose/libfxcg
/libc/tests/strtol.c
UTF-8
622
3.375
3
[ "BSD-3-Clause" ]
permissive
#include <stdio.h> #include <limits.h> struct { const char *str; const int base; const long result; } tests[] = { {" 0", 10, 0}, {"0101", 2, 5}, {"ffff", 16, 0xffff} }; int main(int argc, const char **argv) { for (int i = 0; i < (sizeof(tests) / sizeof(tests[0])); i++) { printf("...
true
df99935e341b9e7c6c8f043be0a8129dd96a923f
C
MatanDev/C_Final_Project
/project_files/FinalProject/image_parsing/SPImageData.h
UTF-8
2,137
3.34375
3
[]
no_license
#ifndef SPIMAGEDATA_H_ #define SPIMAGEDATA_H_ #include "../SPPoint.h" #include <stdbool.h> /** A type used for defining an ImageData item**/ typedef struct sp_image_data { int index; int numOfFeatures; SPPoint* featuresArray; } sp_image_data; /** A type used for defining an ImageData item as a pointer**/ typedef ...
true
334a50bb10e28a997e377cb74988ddf1ab36f1a3
C
SamuelFelipe/sorting_algorithms
/0-bubble_sort.c
UTF-8
535
4.03125
4
[]
no_license
#include "sort.h" /** * bubble_sort - sort an array with the bubble method * @array: <- * @size: array size * * Return: none */ void bubble_sort(int *array, size_t size) { size_t i, j; int aux, tmp; if (!array) return; else if (size <= 1) return; for (i = 0; i < size - 1; i++) { aux = array[0]; ...
true
88b5ffa3b02987302ae50ceba9d16adf2f39ec42
C
alam0/C
/lab9/testing4.c
UTF-8
1,486
3.21875
3
[]
no_license
// testing4.c #include <stdio.h> #include "gfx4.h" int main() { int wid = 600, ht = 500; char c; char *thefont = "-misc-fixed-bold-r-normal--13-120-75-75-c-70-iso8859-1"; char *mytext = "Notre Dame Fighting Irish"; int x_winctr, y_winctr; // window's center int pxl_w, pxl_h, x_txt, y_txt; ...
true
27ba31b30a31fb44d3f723a93d7253ce9673551f
C
GabrielGanne/ix
/src/sht.h
UTF-8
906
2.5625
3
[ "MIT" ]
permissive
#ifndef SIMPLE_HASHTABLE_HEADER #define SIMPLE_HASHTABLE_HEADER #include <stddef.h> #include <stdint.h> typedef void * (* alloc_fn)(size_t size); typedef void (* free_fn)(void * ptr); typedef uint32_t (* hash_fn) (void * data, size_t datalen); /* simple table of linked-lists */ struct sht; struct sht * sht_create_c...
true
592197342101fc71a40cef42348cfbdb33ae12a8
C
DManojprabhu/program
/IF.C
UTF-8
559
3.40625
3
[]
no_license
#include<stdio.h> #include<conio.h> main() { int a; //char one,two,three,four,five,six,seven,eight,nine,ten; clrscr(); printf("Enter the number:"); scanf("%d",&a); //if(a>=1)&&(a<=10) if(a==1) printf("\none"); else if(a==2) printf("\ntwo"); else if(a==3) printf("\nthree"); else if(a==4) printf("\nFour"); else if(a==5) ...
true
47e990030571a93d7470150cefb816d80a3cabb4
C
cristianheredia/holbertonschool-low_level_programming
/0x02-functions_nested_loops/0-holberton.c
UTF-8
149
2.640625
3
[]
no_license
#include "holberton.h" int main(void) { char c[10] = "Holberton"; int i; for (i = 0; i < 10; i++) putchar (c[i]); putchar('\n'); return (0); }
true
b0fb778236a685ae23f00078ba178f3026620888
C
MarieBiau/Parallelisme-en-C
/Code/src/system_utils_etu.c
UTF-8
976
2.984375
3
[]
no_license
/** * @file * @brief Implementation by students of usefull function for the system project. * @todo Change the SU_removeFile to use exec instead of system. */ #include "system_utils.h" /** * @brief Maximum length (in character) for a command line. **/ #define SU_MAXLINESIZE (1024*8) /********************** ...
true
5a928fed2efa6c5f90a4173a1c14659d36765cfb
C
David-Flores-Ruiz/Flores_Gonzalez_T5
/source_v4/T02_Main_Layered.c
UTF-8
1,564
2.796875
3
[]
no_license
/* * @file: T02_InvertSequencesRGB_White_Layered.c * @company: ITESO * @Engineer Team: D.F.R. / R.G.P. */ #include <stdio.h> #include <stdint.h> #include "MK64F12.h" #include <bits.h> // se añadió .h vClass #include <GPIO.h> // se añadió .h vClass - tiene propio .c vClass int main(void) { GPIO_clock_gati...
true
1113feea58b2350a471e9d991de342b9ae825e8d
C
dolovnyak/printf
/tests/custom_tests/test_u.c
UTF-8
1,950
3.09375
3
[]
no_license
#include <stdio.h> #include "ft_printf.h" int main(void) { unsigned long a; unsigned long b; //a = 5; //b = 5; a = -42; b = -42; //a = 4294967295; //b = 4294967295; /*All with unsigned ints: 11 symbols and 1*/ printf("original: %u\n", a); ft_printf("our : %u\n\n", b); //flags printf("FLAGS...
true
af065ade208221ca15999ef0fce2cc006685a78b
C
Rouser919/Codewars
/C/7 kyu Make a function.c
UTF-8
177
2.6875
3
[]
no_license
double arithmetic(double a, double b, char *s) { if (s[0]=='a') return a+b; else if (s[0]=='s') return a-b; if (s[0]=='m') return a*b; else if (s[0]=='d') return a/b; }
true
2ebfb2096bdccc3cff1b3c006bd71ba99366fc9f
C
LazyRen/side-projects
/malloclab/src/mm.c
UTF-8
8,307
3.078125
3
[]
no_license
/* * mm-naive.c - The fastest, least memory-efficient malloc package. * In this naive approach, a block is allocated by simply incrementing * the brk pointer. A block is pure payload. There are no headers or * footers. Blocks are never coalesced or reused. Realloc is * implemented directly using mm_malloc and mm...
true
06571e04decff7c718db4aa67c09d564d3cd76ee
C
h15/examples
/9. MultiThread Life. One thread for calc, one thread for print [C]/life.c
UTF-8
3,186
2.6875
3
[]
no_license
#include <stdlib.h> #include <stdio.h> #include <time.h> #include <pthread.h> #include <sys/ioctl.h> #define X 80 #define Y 80 #define DEAD '.' #define ALIVE '0' #define mb() asm volatile("mfence":::"memory") #define true 1 #define false 0 int size_x, size_y; char MAP[X][Y]; volatile char LOCK = 0; volatile char ...
true
8dbe4fa4161fcf1b2dd68352e5ed661f332d6abd
C
kousu/statasvm
/src/sttrampoline.c
UTF-8
1,828
2.6875
3
[ "MIT" ]
permissive
/* sttrampoline.c: this is an optional helper file to link into Stata plugins which provides infrastructure plugins to define subcommands. */ /* This lets a single plugin operate in multiple steps which is necessary sometimes to work around the limited Stata API, */ /* and it lets a sin...
true
42f9545054fba5600b1897c690122d082b2f1e98
C
ramvishvas/Old_Chegg_Solution
/Quiz.c
UTF-8
447
3.4375
3
[]
no_license
#include <stdio.h> int main() { float number; printf("How much money you made last year: "); scanf("%f",&number); number = number*0.7; printf("After taxes: $%.2f\n", number); if (number < 0) { printf("invalid input\n"); } else if (number >= 0 && number <= 20000) { printf("broke\n"); } el...
true
b0c78d3f80cb555a6d7a212dd188d55f3dab9358
C
sujibala/banu
/intervalodd.c
UTF-8
178
3.015625
3
[]
no_license
#include <stdio.h> int main(void) { // your code goes here int s,q,num; scanf("%d %d",&s,&q); for(num=s;num<=q;num++) { if(num%2==1) printf("%d ",num); } return 0; }
true
4803e40ddcba26b0c0f5d22f3dda7fc30f2c980d
C
zhangye243/RLFluidControl
/clientNektar/Hlib/src/Curvi.C
UTF-8
59,854
2.578125
3
[ "MIT" ]
permissive
// // // Author: T.Warburton // // Design: T.Warburton && S.Sherwin // // Date : 12/4/96 // // ...
true
eae05ae67e77643a92604b05a9360b86a3e990d6
C
kovacszitu/Essentials
/CodeWars/C/WhoHasTheMostMoney.c
UTF-8
3,020
3.859375
4
[]
no_license
/* You're going on a trip with some students and it's up to you to keep track of how much money each Student has. A student is defined like this: #define NAMELIM 0x8 struct student { char name[NAMELIM + 1]; unsigned fives; unsigned tens; unsigned twenties; }; As you can tell, each Student has some...
true
3ee5187dcaf3fec77f293f9f0d30bb938f1ded87
C
ADejbakhsh/Minitalk
/srcs/helper.c
UTF-8
1,882
2.609375
3
[]
no_license
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* helper.c :+: :+: :+: ...
true
5f90310c0e603f5aa9b24329896e2ca66d348ad6
C
AlexandreNS/aeds-1
/Exercicios_Cap9/exercicio3.c
UTF-8
363
3.734375
4
[]
no_license
#include <stdlib.h> #include <stdio.h> #include <string.h> char* retirarEspacos(char frase[]){ for(int i=0; frase[i] != '\0'; i++){ if (frase[i] == 32){ frase[i] = '\a'; } } return frase; } int main(){ char frase[256]; printf("Digite uma frase:\n"); fgets(frase, 255, stdin); printf("\nFrase alterada:\...
true
d21e28bcd7cfe6e3f9b8045dd89d8ad521c39ea3
C
Elvis2000717/C-
/Reverse string order.c
WINDOWS-1252
245
3.421875
3
[]
no_license
#include <stdio.h> void reverse_string(char* string) { if (*string != 0) { reverse_string(string + 1); } //ȥ\0 string--; printf("%c", *string); } int main() { char arr[] = "student"; int n; reverse_string(arr); return 0; }
true
b021d1abee21e9f017a41e829fb682f3e5afe56a
C
phuong27102000/NTRU_HRSS_KEM_SV
/Draft_Phuong/Verify_Encaps/ntruhrss701/Phuong/api_decaps.c
UTF-8
2,786
2.5625
3
[ "MIT" ]
permissive
#include "../Ref/api.h" #include "../Ref/params.h" #include "stdio.h" #include "stdint.h" #include "string.h" int main() { int i; uint8_t sk[NTRU_SECRETKEYBYTES]; uint8_t c[NTRU_CIPHERTEXTBYTES]; uint8_t k2[NTRU_SHAREDKEYBYTES]; unsigned int a; char buffer[100]; char hex[2]; char name[6...
true
4c659fa2c2075d43f7e17352b14725e998f49cc4
C
AhmedElbanawi/MicroWave
/MicroWave/MCAL/GPIO/GPIO.c
UTF-8
17,283
2.53125
3
[]
no_license
/******************************************************************************/ #ifndef MEMORY_H #include "MEMORY.h" #endif /******************************************************************************/ #ifndef GPIO_H #include "GPIO.h" #endif /*****************************************************************...
true
28a076dbd3e5e90feacc44a20b442403814de940
C
DaButter/RTR105
/darbi/1ld_series/1ld_series_final.c
UTF-8
1,345
3.390625
3
[]
no_license
#include <stdio.h> #include <math.h> void main() { int k; long double Sum,a,x,y; //series vizualizacijas bloks; printf("\n\n\t 500 \n"); // ar \t taulaciju nocentre printf("\t -------- \n"); printf("\t \\ (k+1) k (2k-1)\n"); //pakapes printf("\t \\ (-1)^ *x^ *2^\n"); //d...
true
2a1d9648da38c21fbf8ba0fa80603ac1f848e620
C
LiGouCai/Nemu
/nexus-am/libs/klib/src/string.c
UTF-8
1,548
2.875
3
[]
no_license
#include "klib.h" #if !defined(__ISA_NATIVE__) || defined(__NATIVE_USE_KLIB__) size_t strlen(const char *s) { int i = 0; while (s[i++]); return --i; } char *strcpy(char* dst,const char* src) { int i = 0; while (1) { dst[i] = src[i]; if (!src[i]) break; i++; } return dst; } char* strncpy(...
true
142c7a1cbee29a7ac2b36980993ffc34c5fd764a
C
pcsantos/UVA
/ANSI_C/Accept/Problem10879-CodeRefactoring/main.c
UTF-8
593
3.4375
3
[]
no_license
#include<stdio.h> int main(void) { int ways = 0; int i, j, k; int testCases, value; scanf("%d\n", &testCases); for (i = 1; i <= testCases; i++) { scanf("%d\n", &value); ways = 0; printf("Case #%d: %d", i, value); for (j = 2; j <= value / j; j++) { k ...
true
8e9dea29061921378ce926daf358399977bfeca3
C
maciejjo/openmp-tasks
/ex1/src/ex1.c
UTF-8
285
2.96875
3
[]
no_license
#include <omp.h> #include <stdio.h> #include <stdlib.h> #define THREADS_NO 4 int main() { int i; omp_set_num_threads(THREADS_NO); #pragma omp parallel { for(i = 0; i <= 5; i++) printf("[%d] Hello World, i = %d\n", omp_get_thread_num(), i); } return EXIT_SUCCESS; }
true
94561257b9be42a423f976cb2253480da7b40f4a
C
riteshja88/UIC
/fall2012/cs450/pub/solutions/hw1/.svn/text-base/hw1.c.svn-base
UTF-8
3,241
2.90625
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <string.h> #include <sys/types.h> #include <sys/uio.h> #include <sys/socket.h> #include <sys/select.h> #include <netinet/in.h> #include <netdb.h> #include <arpa/inet.h> void usage() { printf("Usage: hw1 <URL>\n"); exit(1); } int main(int argc, char...
true
1d31f16ba6a9388f19756990fb15734ad01da9c7
C
LeoFonsecaP/Modelagem-Computacional-em-Grafos
/Grafo_com_lista/lista.c
UTF-8
4,849
3.9375
4
[]
no_license
//Implementacao de um TAD Lista //Feito por: Leonardo Fonseca Pinheiro #include <stdio.h> #include <stdlib.h> #include <string.h> #include "lista.h" struct item_{ int indice; int peso; int dist; item* prox; }; struct lista_ { item* ini; item* fim; int tamanho; }; /...
true
52a564208eae9ef0aba42c6ecfe4e454ff33ca00
C
DJasmineJoyline/SQROOT
/sqroot.c
UTF-8
365
3.921875
4
[]
no_license
#include<stdio.h> float squareroot(int n) { float sqr,temp; sqr=n/2; temp=0; while(sqr!=temp) { temp=sqr; sqr=(n/temp+temp)/2; } return sqr; } int main() { int n; float sqr; printf("Enter a number\n"); scanf("%d",&n); sqr=squareroot(n); printf("The square ...
true
3a8f7628b0db2576f449907c17d73f846bd927bf
C
Slav7/Test-SAYNA
/6. algorithme_AdivB.c
UTF-8
389
3.90625
4
[]
no_license
#include <stdio.h> main(){ int A,B,R; printf("Donner deux entiers A et B positifs"); do{ scanf("%d", &A); scanf("%d", &B); } while (A>0 && B>0); while (R>0){ R=R-B; } if(R=0) printf("%d est est divisible par %d",A,B); else ...
true
0f08564f1848b0e2b22ca6951bcd868bd52676c5
C
mmirek98/cc-classes
/lab05/sort.c
UTF-8
3,993
3.375
3
[]
no_license
#include <stdlib.h> #include <stdio.h> #include <pthread.h> #include <limits.h> #include <linux/sched.h> #include <time.h> #define LEN 200 struct Borders { int start; int end; }; // int array[] = {4, 2, 3, 1, 5}; int array[LEN]; void prepareArray() { srand(time(0)); int i; for (i = 0; i < LEN; i++) { array[...
true
530b4306c9414e1f9732a3492ce289164d730ced
C
siennadeerlund/juliac
/spoj/kc001.c
UTF-8
227
3.015625
3
[]
no_license
#include <stdio.h> #include <stdlib.h> int main(void) { int a; int b; int c; int wynik; scanf("%d", &a); scanf("%d", &b); scanf("%d", &c); wynik = a + b + c; printf("%d\n", wynik); return EXIT_SUCCESS; }
true
1fbdac5c4e74d0b88a69bd272617dbe5ead38157
C
randomize/queues-task
/queue.c
UTF-8
21,997
2.90625
3
[]
no_license
/* Byte queue library, implemented on single buffer Copyright © 2017 Eugene Mihailenco <mihailencoe@gmail.com> 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 3 of the License, ...
true
0b37bc26edf600424e66a92500bc7d69655cb9e9
C
tjs6f2/CS1050
/LAB4/c-lab4.c
UTF-8
2,243
4.0625
4
[]
no_license
/* Thomas Schultz * Lab: LAB4 * SECTION: CS1050C * Pawprint: TJS6F2 * TA: Dheeraj */ #include <stdio.h> //prototype functions int checkEven(int x); int errorCheck(int y); int checkPrime(int z); int addDigits(int a); void printMizzou(int b); int main (void) { int num;//delcaring variables int numtwo; ...
true
11e1fc312fceaf306e83e6f349f847290359f50c
C
Magoxter/URI-C
/000/1045.c
UTF-8
826
3.890625
4
[]
no_license
/* Tipos Triangulos */ #include <stdio.h> #define MAX 1000 int main (void) { float A,B,C; int tmp; scanf("%f", &A); scanf("%f", &B); scanf("%f", &C); if (A < B) { tmp = A; A = B; B = tmp; } if (A < C) { tmp = A; A = C; C = tmp; } if (B < C) { tmp = B; B = C...
true
abf6b0b738fd8e4e87da1d58511ad6125c7c6bea
C
HAIBALA/APD
/projet.c
WINDOWS-1250
6,407
3.4375
3
[]
no_license
#include"projet.h" int main(){ ImageCouleur *imageLena; ImageCouleur *imageMire; imageLena = chargerImage("C:/Users/AYOUB LABIDI/Desktop/Lena.ppm"); imageMire = chargerImage("C:/Users/AYOUB LABIDI/Desktop/Mire.ppm"); ImageGris *image1 = creerImageGris(imageLena->h,imageLena->l); image1->pixe...
true
91e59410d7cbdc0218f6e56013a12e34d3bbc937
C
dario-santos/Legoland
/pixel.h
ISO-8859-1
1,339
3.328125
3
[]
no_license
#ifndef PIXEL_H #define PIXEL_H #include <stdlib.h> typedef struct PIXEL { int column; int r, g, b; struct PIXEL *pnext; struct PIXEL *pprev; }Pixel; /* * Funo make_vector(int n) * ---------------------------- * TV: n de elementos que o vetor tera * * retorno: vetor com...
true
1edfe1d22105df4a891c43bf4d6192817190d3dc
C
jbtescudeiro16/Programacao-Imperativa
/PI/Manhosas_1/18.c
UTF-8
202
3.515625
4
[]
permissive
int maiorSufixo(char s1[], char s2[]) { int i = strlen(s1) - 1, j = strlen(s2) - 1, conta = 0; while (s1[i] == s2[j]) { conta++; i--; j--; } return conta; }
true
67c567dca0b5b000cfcf65c8ef5246f3ae711c93
C
trstephen/alarmclock
/code/timeKeeping.c
UTF-8
1,921
3.078125
3
[]
no_license
//This code is used with the AlarmClockMp3 project //it is called when incrementing the time manually and //it ensures the time values stay within the bounds of a 12 hour clock #include "timeKeeping.h" void timeHourCheck(void) { //9 rolls over to 0 if((myclockTimeStruct.RTC_Hours & 0x0F) >= 0xA) { myclockTim...
true
03986eea0002df410be20e05cd9af4bcb207db61
C
NickClawson93/web_client
/download.c
UTF-8
2,995
3.078125
3
[]
no_license
#include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <netdb.h> #include <string.h> #include <unistd.h> #include <stdio.h> #include <stdlib.h> #include <string> #define SOCKET_ERROR -1 #define BUFFER_SIZE 100 #define HOST_NAME_SIZE 255 using namespace std; int main(int ...
true
34fbe499fec8b4ecb4df9f2874fe53704e54d4fd
C
hhxhongchen/lab
/lab2/2-3.c
UTF-8
869
2.953125
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <sys/types.h> #include <unistd.h> #include <sys/wait.h> int main(void) { int p1,p2,p3,p4,p5; while ((p1=fork())==-1); if (!p1) { printf("p1 pid %d, ppid %d.\n",getpid(),getppid()); while ((p2=fork())==-1); if (!p2) { printf("p2 pid %d, ppid %d.\n",get...
true
bd308e63abe31e5a9a098c946674ed94971ad38c
C
99002473/LinuxOS
/Activity5/Assignment1/a2.c
UTF-8
398
2.859375
3
[]
no_license
#include<unistd.h> #include<fcntl.h> #include<stdio.h> #include<stdlib.h> #include<string.h> int main() { int fdisp,nbytes; fdisp=open("file1.txt",O_RDONLY); if(fdisp<0) { perr("open"); exit(1); } int length=135; char buffer[length]; nbytes=read(fdisp,buffer,length); if(nbytes<0) { perr("read"); exit(...
true
e52c5b152605f3c4aaa1a3b3256eb47363b18abb
C
patrick-oliveira/disciplinas
/Algoritmos e Estruturas de Dados 1/Laboratorios/Lab1/G_Soremun/Soremun.c
UTF-8
371
3.15625
3
[]
no_license
#include <stdio.h> int main(void){ int original, i = 0; int invertido[4]; scanf("%d", &original); do{ invertido[i] = original%10; i++; original = (original - original%10)/10; }while(original != 0); for(i = 0; i < 4; i++){ printf("%d", invertid...
true
f630b70b9b1335ff0e18868233c18d9065771aed
C
Paravalosp/Assignment-1-Paravalosp
/level3_strings/test_string_length.c
UTF-8
1,609
3.75
4
[]
no_license
#include "unity.h" #include "string.h" #include <stdlib.h> void setUp (void) {} void tearDown (void) {} /** * Test if empty string returns 0. */ void test_empty_string(void) { char* test_string = ""; int length = get_string_length(test_string); TEST_ASSERT_EQUAL(0, length); } /** * Test if string of ...
true
4b715719103d939d1d2ef769a1f862d6b5b2e795
C
936767517/c-test
/work/day-6-18/file.c
UTF-8
332
3.15625
3
[]
no_license
#include<stdio.h> int main(int argc,char **argv) { if(argc<2) { printf("Usage..."); } FILE* fp=NULL; fp=fopen(argv[1],"r"); if(NULL==fp) { printf("fopen()error\n"); return -1; } char ch; while(1) { ch=fgetc(fp); if(EOF==ch) { printf("over"); break; } printf("%c",ch); } fclose(fp); r...
true
a4c44efa3a2aa452577bb0c25d854654a222f061
C
lrgalego/http-redis
/src/query_string.h
UTF-8
1,664
3.265625
3
[]
no_license
#include "hash.h" static int count_params(char* query_string, int len) { int count = 1; while(*query_string) { if (*query_string++ == '&') { count++; } } return count; } static Entry new_entry(char* arg) { Entry e; e.key = strtok(arg,"="); e.value = strtok(NULL,"="); dd( "...
true
7f802ab052b2f6b03841018a9434b304f2c75b8c
C
occlum/occlum
/demos/gdb_support/sample.c
UTF-8
262
3.09375
3
[ "BSD-3-Clause" ]
permissive
#include <stdio.h> // GDB will stop here int divide_by_zero(int num) { int result; int zero = 0; result = num / zero; return result; } int main() { int ret; printf("Start to calculate\n"); ret = divide_by_zero(1); return 0; }
true
f01405871354116dd8b3c4ef5f42f9117fc55663
C
Gomavijayan/c-program
/leapyear.c
UTF-8
443
3.71875
4
[]
no_license
#include <stdio.h> int main() { int year; printf("Enter ur birthday year to check its is leap year or not?"); scanf("%d", &year); if(year%4 == 0){ if (year%100 ==0) { if(year%400 == 0) printf("%d is a leap year",year); else printf("%d is not a leap year",year); ...
true