source
string
code_lang
string
content
string
idx
int64
the-stack-v2-dedup
C
/* AUTHOR : Sayantan Pal DATE : 07.04.2019 QUESTION : Write a program to find whether a given matrix is upper triangular or lower triangular */ #include <stdio.h> int main() { int array[100][100],r,c; int row, col, isUpper,isLower; printf("\nEnter number of rows and coloumn in m...
1,331,100
the-stack-v2-dedup
C
/* AUTOGENERATED FILE. DO NOT EDIT. */ #ifndef _MOCK_OPERATOREVALUATE_H #define _MOCK_OPERATOREVALUATE_H #include "operatorEvaluate.h" void mock_operatorEvaluate_Init(void); void mock_operatorEvaluate_Destroy(void); void mock_operatorEvaluate_Verify(void); #define operatorEvaluate_Ignore() operatorEvaluate_CMockI...
1,331,101
the-stack-v2-dedup
C
#pragma once #include"math/vec3.h" #include"math/matrix.h" struct Camera{ Vec3 position; Vec3 velocity; float yaw; float pitch; float roll; Matrix rotationMatrix; };
1,331,102
the-stack-v2-dedup
C
/* 5) escreva um TAD genérico Imagem. Esse TAD armazena Pixels numa matriz. Cada pixel pode ter um tipo diferente, o mais comum é que seja RGC (vetor de char de 3 posiçoes), mas pode ser de qualquer tipo. Cada pixel possui ainda uma coordenada dentro da imagem. Implemente as funções: - construir (vc decide como ...
1,331,103
the-stack-v2-dedup
C
FILE* fopen(const char* nomFichier, const char* modeOuverture); int fgetc(FILE* pointeurDeFichier); int fclose(FILE* pointeurSurFichier);
1,331,104
the-stack-v2-dedup
C
../../../SRGMediaPlayer/RTSMediaPlayer/RTSMediaPlayerViewController.h
1,331,105
the-stack-v2-dedup
C
/****************************************************************** * PS2 controller library for AVR * * Loosly based off of code by Shutter on Arduino Forums, and modified * (added analog stick support) by Bill Porter (http://www.billporter.info/?p=219) * * Converted to generic AVR library without C++ or Arduino ref...
1,331,106
the-stack-v2-dedup
C
const unsigned short LevelThreePalette_Palette[256] = { 0x0000, 0x042e, 0x2108, 0x210b, 0x5929, 0x05c1, 0x24d9, 0x4210, 0x25f6, 0x26c6, 0x2a1a, 0x6318, 0x7735, 0x0f9c, 0x7fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x00...
1,331,107
the-stack-v2-dedup
C
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_numberlen.c :+: :+: :+: ...
1,331,108
the-stack-v2-dedup
C
#include <stdio.h> #include <stdlib.h> int main() { int Num[3][3]={ {1, 2, 3},{4, 5,6},{7,8,9} }; int i, j; /* 定義整數變數 i 與 j */ for ( i=0; i < 3; i++) /* 巢狀 for 迴圈 */ for ( j=0; j < 3; j++) { printf("Num[%d][%d] 的值:%d", i, j, Num[i][j]); /* 輸出陣列元素的值 */ ...
1,331,109
the-stack-v2-dedup
C
#include "includes.h" #define TASK_STK_SIZE 512 // Size of each task's stacks #define N_TASKS 2 // Number of identical tasks OS_STK TaskStk[N_TASKS][TASK_STK_SIZE]; // Tasks stacks OS_STK TaskStartStk[TASK_STK_SIZE]; char a; OS_EVENT *RandomSem; void Task1(void *data); void Task2(void *data); void...
1,331,110
the-stack-v2-dedup
C
#pragma once /*一些基础程序,在返回值,断言,io输出等,不设置统一规定,重点放在基础结构上*/ /*传值 有用指针,有用引用,没统一,我故意的*/ #define listsize 100 typedef int DataType; typedef struct { DataType list[listsize];/*listsize的设置根据需求有时会+1*//*这里是静态存储*/ int length; }SeqList; void InitList(SeqList *L) {/*初始化线性表*/ L->length = 0; } int ListEmpty(SeqList L) {/*判断线性表是否为空...
1,331,111
the-stack-v2-dedup
C
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_strlen.c :+: :+: :+: ...
1,331,112
the-stack-v2-dedup
C
/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Kanwar Jit Singh **********/ #include "spice.h" #include <stdio.h> #include "cktdefs.h" #include "asrcdefs.h" #include "sperror.h" #include "util.h" double *asrc_vals, *asrc_derivs; int asrc_nvals; int ASRCload(GENm...
1,331,113
the-stack-v2-dedup
C
/* 3-13-09-19-13.47.c -- 第三章第十三题 */ #include <stdio.h> #include "unidirectional_linked_list.h" #define ISIZE 20 #define LSIZE 1000 int main (void) ; List radix_sort (int * arr_student) ; void print_list (const Item * pitem) ; int power (const int bits) ; int resolve_figure (const int num, const int bits) ; int main...
1,331,114
the-stack-v2-dedup
C
../../../Target Support Files/Ji/Ji-umbrella.h
1,331,115
the-stack-v2-dedup
C
/* hw01 系級:資工二 學號:4104056004 姓名:李家駿 */ #include <stdio.h> #include <stdlib.h> #include <time.h> #define MAX_ROW 15 #define MAX_COL 15 typedef struct point{ int x; int y; int value; }Point; Point stack[MAX_ROW*MAX_COL]; Point finalpath[MAX_ROW*MAX_COL]; Point nowPoint; void stack_clear();...
1,331,116
the-stack-v2-dedup
C
/* SYMMETRICA source code file: mo.c */ #include "def.h" #include "macro.h" #ifdef DGTRUE /* Darstellungen werden benoetigt */ #define ALLOCOFFSET 0 #define TL_calloc(a,b) SYM_calloc(a+ALLOCOFFSET,b) #define TL_malloc(a) SYM_malloc(a+ALLOCOFFSET) #define TL_free(a) SYM_free(a) typedef signed char TL_BYTE; typed...
1,331,117
the-stack-v2-dedup
C
/*-----------------OXIDE_VEL-------------------------------------------- * This subroutine contains the oxide growth rate model. It uses global * parameters like temperature and local parameters like oxidant conc to * compute the displacement at each interface point. Then it calls the * oxide solver to compute the...
1,331,118
the-stack-v2-dedup
C
#include<stdio.h> #include<stdlib.h> void swap(char *a,char *b) { char *temp; temp = a; a = b; b = temp; } void main() { int i; char **a; a = malloc(2*sizeof(char *)); for(i=0;i<2;i++) *(a+i) = malloc(10*sizeof(char)); *(a) = "hello"; *(a+1) = "world"; //swap(*(a),*(a+1)); char *temp; // char *temp1 // tem...
1,331,119
the-stack-v2-dedup
C
#include <wiringPi.h> #include <stdio.h> #include <unistd.h> #include <stdlib.h> #define CLOCKWISE 1 #define COUNTER_CLOCKWISE 2 void delayMS(int x); void rotate(int* pins, int direction); int main(int argc,char* argv[]){ if(argc < 4){ printf("Usage example: ./motor 0 1 2 3 \n"); return 1; } int pinA = atoi...
1,331,120
the-stack-v2-dedup
C
// Automatically generated file, do not edit. #pragma once const uint8_t Dreamer2345_Base[] = { 54, 55, 0x00,0x00,0x00,0x09,0x94,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x09,0x99,0x44,0x90,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0...
1,331,121
the-stack-v2-dedup
C
#include "common.h" typedef struct { byte_t type; short refCount; void* data; pfnDeleter deleter; } objectp_t; // // public object methods // object_t QPCreateObject(byte_t type, void* data, pfnDeleter deleter) { objectp_t* object; if (type >= OBJECT_MAX) { DebugOut(L"Invalid ob...
1,331,122
the-stack-v2-dedup
C
/* * File: exo3.h * Author: apacot * * Created on 19 novembre 2019, 13:45 */ #ifndef EXO3_H #define EXO3_H #include <stdio.h> #include <stdlib.h> #define LARGEUR 15 #define HAUTEUR 9 float additionReels(float v1, float v2); void afficherCarre(int); int calculerCarre(int x); float calculerDiscriminant(float,f...
1,331,123
the-stack-v2-dedup
C
struct Segm { size_t addr, size; }; struct Proc { unsigned int ID; int time_load = -1; int time_done = -1; int seg_number = -1; size_t time_join; size_t time_todo; size_t time_left; size_t segm_size; }; struct Settings { const unsigned int TASKS_POSSIBILITY = 100; //100 const unsigned...
1,331,124
the-stack-v2-dedup
C
C circumCircle(T t) { P a = t.d[0], b = t.d[1], c = t.d[2]; b -= a; c -= a; R s = 2*cross(b, c); R x = norm(b-c), y = norm(c), z = norm(b); R S = x+y+z; P r = (y*(S-2*y)*b+z*(S-2*z)*c)/(s*s); return C(r + a, abs(r)); } C smallestEnclosingCircle(Pol &p, int ps, T q = T(), int qs = 0) { i...
1,331,125
the-stack-v2-dedup
C
#include<stdio.h> int fib(int num) { if(num==0) return 0; else if(num==1) return 1; else return(fib(num-2)+fib(num-1)); } int main() { int n,d,i; printf("enter n value\n"); scanf("%d",&n); printf("fibonacci series="); for(i=0;i<n;i++) { d=fib(i); printf("%d\t",d); } }
1,331,126
the-stack-v2-dedup
C
{ //=========Macro generated from canvas: c/c //========= (Thu Jul 13 16:10:58 2017) by ROOT version5.34/36 TCanvas *c = new TCanvas("c", "c",0,0,800,600); c->Range(-27.5,-6985.151,-22.5,62866.36); c->SetFillColor(0); c->SetBorderMode(0); c->SetBorderSize(2); c->SetFrameBorderMode(0); c->SetFrameB...
1,331,127
the-stack-v2-dedup
C
/* ** set_user.c for epitech in /home/chapuis_s/rendu/ ** ** Made by chapui_s ** Login <chapui_s@epitech.eu> ** ** Started on Tue Apr 7 04:39:01 2015 chapui_s ** Last update Thu Apr 16 00:12:32 2015 chapui_s */ #include "server.h" void set_registered(t_client *client) { reply(client, 001, client->nick, "Welcom...
1,331,128
the-stack-v2-dedup
C
//// //// NSPredicate+Regex.h //// LotterySteward //// //// Created by apple on 15/12/7. //// Copyright © 2015年 ytx. All rights reserved. //// // //#import <Foundation/Foundation.h> // //@interface NSPredicate (Regex) //+ (BOOL)verifyIsNotEmpty:(NSString *)str; //验证是否不为空 // // + (BOOL)verifyText:(NSString *)text wi...
1,331,129
the-stack-v2-dedup
C
/*********************************************************************** * $Id:: lpc313x_nand_driver.c 8087 2011-09-14 04:13:00Z ing02124 $ * * Project: LPC313x NAND controller driver * * Description: * This file contains driver support for the LPC313x NAND. * *********************************...
1,331,130
the-stack-v2-dedup
C
#include "config.h" #include "types.h" #include "vdp.h" #include "vdp_pal.h" #include "base.h" // we don't want to share them extern u32 VIntProcess; extern u32 HBlankProcess; u16 VDP_getPaletteColor(u16 numpal, u16 numcol) { vu16 *pw; vu32 *pl; u16 addr; /* Point to vdp port */...
1,331,131
the-stack-v2-dedup
C
/* ********************************************************************** *\ * Copyright IBM Corporation 1988,1991 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ /* $Disclaim...
1,331,132
the-stack-v2-dedup
C
/* * Copyright 2009 Nicolai Hähnle <nhaehnle@gmail.com> * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * on the rights to use, copy,...
1,331,133
the-stack-v2-dedup
C
#include <stdio.h> void printEinmaleins(int von, int bis) { printf("Einmaleins\n"); printf("von: "); scanf("%d", &von); printf("bis: "); scanf("%d", &bis); int i; for (i = 1; i < 11; i++) { int j; for(j = von; j <= bis; j++) { int printNum = j * i; ...
1,331,134
the-stack-v2-dedup
C
#include<stdio.h> #include<conio.h> /** void main() { int n,k=1,l=1; printf("enter value of n:"); scanf("%d",&n); for(int i=1;i<=n;i++) { for(int j=1;j<=i;j++) { printf("%d",k); k=k+l; l++; } printf("\n"); } } */ void display(...
1,331,135
the-stack-v2-dedup
C
/* * SPI write example. */ #include "gos.h" /* * Test switches: * * TESTPROG Loads a test program from the mgm13_bluetooth_bin array to the * bluetooth target processor and runs it. * * TESTDATA Tests sending of random data packets to the bluetooth target * processor. If the target is configured...
1,331,136
the-stack-v2-dedup
C
//////////////////////////////////////////////////////////////////////////////// // // File: graphics.h // // Description: This file contains graphics-related functions for the // robot competition. // // Author: Capt. Mike LeSauvage // // Revision History: 6 Mar 2006 - Created // //////////////...
1,331,137
the-stack-v2-dedup
C
#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...
1,331,138
the-stack-v2-dedup
C
#include <stdio.h> #include <stdlib.h> int main() { int heap[10], i, j, n, temp, c, root; printf("Enter number of Elements:"); scanf("%d", &n); printf("Enter Integers:\n"); for(i = 0; i < n; i++) { scanf("%d", &heap[i]); } printf("\nHeap Array:\n"); for(i...
1,331,139
the-stack-v2-dedup
C
#include <stdio.h> #include <string.h> typedef struct {char name[20];int num;int marks[20];float avr;} student; int main() { student st[30]; student c; int i,j,ch,bru,brp; float avr; do{ printf("Enter the amount of students in class: "); scanf("%d",&bru); }while(bru < 1 || bru > ...
1,331,140
the-stack-v2-dedup
C
#include "cpe/pal/pal_strings.h" #include "cpe/dr/dr_json.h" #include "gd/app/app_context.h" #include "cpe/aom/aom_obj_mgr.h" #include "cpe/aom/aom_obj_hash.h" #include "gift_svr_generate_record.h" const char * gift_svr_record_dump(gift_svr_t svr, void const * record) { return dr_json_dump_inline( gd_app_t...
1,331,141
the-stack-v2-dedup
C
// Generate a table of prime numbers #include <stdio.h> int main() { _Bool isPrime; for (int p = 2; p <= 100; ++p) { isPrime = 1; for (int d = 2; d < p; ++d) { if (p % d == 0) { isPrime = 0; } } if (isPrime != 0) { printf("%3i ", p); } } printf("\n"); return 0...
1,331,142
the-stack-v2-dedup
C
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_putnendl_fd.c :+: :+: :+: ...
1,331,143
the-stack-v2-dedup
C
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* mouv_julia.c :+: :+: :+: ...
1,331,144
the-stack-v2-dedup
C
#include "serial_uart.h" #include "nvic.h" #include "stm32h7xx_ll_usart.h" #ifdef STM32H7 uartDevice_s uartDevmap[UARTDEV_COUNT] = { [UARTDEV_1] = { .ref = USART1, .IRQn = USART1_IRQn, .rcc = RCC_APB2(USART1), .rxPriority = NVIC_PRIO_SERIALUART1 }, [UARTDEV_2] = { .ref = USART2, .IRQn = USART2_IRQn, .rcc = RCC_APB1...
1,331,145
the-stack-v2-dedup
C
#include "adc.h" #include "lpc11xx.h" void ADCInit( void ) { LPC_SYSCON->SYSAHBCLKCTRL |= (1 << 16); LPC_IOCON->R_PIO1_0 &= ~0x07; LPC_IOCON->R_PIO1_0 |= 0x02; LPC_IOCON->R_PIO1_0 &= ~(3<<3); LPC_IOCON->R_PIO1_0 &= ~(1<<7); ...
1,331,146
the-stack-v2-dedup
C
#ifndef __THREADS_PORTS_H #define __THREADS_PORTS_H #include <signal.h> #include <string.h> #include <pthread.h> #include "types.h" #define E_OK 0 #define E_OS_LIMIT -100; StatusType SendOutput_runtime(thread_queue_t * global_q, int port_id, void * value); StatusType NextValue_runtime(thread_queue_t * global_q, int...
1,331,147
the-stack-v2-dedup
C
//double_list #include <stdio.h> #include <string.h> #include <stdlib.h> #define bzero(a, b) memset(a, 0, b) //节点结构体,每个节点分别保存了一个指向前一个节点的指针和指向后一个节点的指针,以及保存数据的指针 struct _node { //定义一个_node类型的结构体 struct _node *prevNode; //连接前一个节点的指针 struct _node *nextNode; ...
1,331,148
the-stack-v2-dedup
C
/* 2017, 2018 Stef Bon <stefbon@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 2 of the License, or (at your option) any later version. This program is distrib...
1,331,149
the-stack-v2-dedup
C
{ TCanvas *canvasT = new TCanvas("canvasT", "canvasT", 900, 500); canvasT->Divide(1,1); canvasT->cd(1); TH1F *his1 = new TH1F("his1.class(Error).style(line-color:#f30000;)", "his1", 100, -5, 5); his1->FillRandom("gaus", 15000); his1->SetStats(kFALSE); TH1D *his2 = new TH1D("his2.class(Error)", "his2", 100...
1,331,150
the-stack-v2-dedup
C
/* Polylits $title literals used for accessing poly memory Modified: 07/02/87 - MWH - Author */ /* This is the structure of a 32 bit poly memory pointer: * * +-----------------------------+ * data present-->| bin | unused |stereo|page | base.msb * bits in field-->|..2..|....9.....|...
1,331,151
the-stack-v2-dedup
C
// File: case_ex.h #include "systemc.h" enum weekday {sunday, monday, tuesday, wednesday, thursday, friday, saturday}; const int OUT_SIZE = 4; SC_MODULE (case_ex) { sc_in<weekday> day_of_week; sc_out<sc_uint<OUT_SIZE> > sleep_time; void prc_case_ex(); SC_CTOR (case_ex) { SC_METHOD (prc_case_ex); sensitive ...
1,331,152
the-stack-v2-dedup
C
1. How to generate full sequences ? There is better way to do that. 2. How to generate total random number ? 3. Common sort etc.
1,331,153
the-stack-v2-dedup
C
// This executes the cd command #include <stdlib.h> #include <stdio.h> #include <string.h> #include <unistd.h> #include <errno.h> #include <sys/types.h> #include <sys/wait.h> #include <signal.h> char PresentDir[100]; int executeCD(char ** params){ int err; // Checking args[1] // If found go to that directory if(...
1,331,154
the-stack-v2-dedup
C
#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...
1,331,155
the-stack-v2-dedup
C
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_lstnew.c :+: :+: :+: ...
1,331,156
the-stack-v2-dedup
C
#include "ets_sys.h" #include "osapi.h" #include "gpio.h" #include "os_type.h" /** * Main entry */ void sdk_init_done_cb(void); os_timer_t start_timer; void start_timer_cb(void *arg) { static int on = 0; if (!on) { /* if LED is OFF - turn it on */ gpio_output_set(BIT16, 0, BIT16, 0); on = 1; } else { /* if ...
1,331,157
the-stack-v2-dedup
C
/* * GStreamer * Copyright (C) 2008 Julien Isorce <julien.isorce@gmail.com> * Copyright (C) 2012 Matthew Waters <ystreet00@gmail.com> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundat...
1,331,158
the-stack-v2-dedup
C
/* * Copyright (C) 2015 Michael Brown <mbrown@fensystems.co.uk>. * * 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 any later version. * * This progr...
1,331,159
the-stack-v2-dedup
C
/*Copyright (C) 2020 Telit Communications S.p.A. Italy - All Rights Reserved.*/ /* See LICENSE file in the project root for full license information. */ /** @file azx_pduDec.c @brief Decoding functionalities for PDUs @details @note Dependencies: m2mb_types.h @author Fabio Pi...
1,331,160
the-stack-v2-dedup
C
unsigned int __fastcall sub_80724F4(unsigned __int8 a1, unsigned __int8 a2, unsigned __int8 a3, int a4, unsigned __int8 a5) { int v5; // r8@1 unsigned int v6; // r6@1 unsigned int v7; // r4@1 unsigned int v8; // r1@1 unsigned int v9; // r7@3 unsigned int v10; // r4@3 unsigned int i; // r4@7 unsigned int...
1,331,161
the-stack-v2-dedup
C
#include <cs50.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> /** * caesar.c * pset2, cs50 Spring 2014 * * Damian Haase * mail@damianhaase.com * * Accept a single command-line argument (k): a non-negative integer. If no * argument, or more than one argument, print an error me...
1,331,162
the-stack-v2-dedup
C
/* statusbar.c : irssi Copyright (C) 1999-2001 Timo Sirainen 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 (at your option) any later versi...
1,331,163
the-stack-v2-dedup
C
#pragma once // Draw parameters #define WIDTH 11 #define HEIGHT 17 #define SpacePadding_x 5 #define SpacePadding_y 5 #define BoxPadding_x 1 #define BoxPadding_y 0 #define PointPadding_x 3 #define PointPadding_y 6 #define movingPoint_x (WIDTH+SpacePadding_x+PointPadding_x) #define movingPoint_y (PointPadding_y+SpacePad...
1,331,164
the-stack-v2-dedup
C
#include <stdlib.h> #include <stdint.h> // uint8_t definitions #include <stdbool.h> // true/false definitions #include <stdio.h> #include <xc.h> #include "config.h" #include "DispTouch.h" #include "utils.h" #include "game1.h" #include "game2.h" #include "game3.h" #include "game4.h" volatile uint16_t ti...
1,331,165
the-stack-v2-dedup
C
#include <stdio.h> int main() { int a; scanf("%d", &a); if(a % 2 != 0) printf("%d is odd", a); else printf("%d is not odd", a); return 0; }
1,331,166
the-stack-v2-dedup
C
#ifndef _SPI_FAULTSET__ #define _SPI_FAULTSET__ #include "config.h" #include "GPIO.h" #include "delay.h" #define SPI_DS P13 #define SPI_CLK P15 #define SPI_STP P14 #define SPI_MR P16 //基本硬件驱动函数 void GPIO_SPI_Init(void); void Fast595allClr(void); void Frame595Clr(u8 length); void DatsIn595(u8 Dats); void Frame595...
1,331,167
the-stack-v2-dedup
C
#include<stdio.h> //Function prototype void read(int*,int); void print(int*,int); void sum(int*,int); void main() { int arr[3][3]; read(&arr,3); //To take input for array print(&arr,3); //To print the entered array sum(&arr,3); //To sum the left and right diagonal elements } void...
1,331,168
the-stack-v2-dedup
C
/* https://www.ibm.com/developerworks/ru/library/au-unix-readdir/index.html */ /* Используя макрос S_*() для поля st_mode, можно определить тип файла: S_ISBLK(mode) – специальный блочный файл? (обычно это блочное устройство). S_ISCHR(mode) – специальный символьный файл? (обычно это символьное устройство). S_ISDIR(...
1,331,169
the-stack-v2-dedup
C
/* ** EPITECH PROJECT, 2021 ** my_rpg ** File description: ** game */ #include "rpg.h" #include "struct.h" char **read_file_inv(char *filepath) { int fd = open(filepath, O_RDONLY); char *buff; char **array = NULL; int bytes_nb = get_file_bytes_nb(filepath); if (fd < 0) return (NULL); ...
1,331,170
the-stack-v2-dedup
C
#include <ntddk.h> #include "source.h" #include <ntstrsafe.h> NTSTATUS RegistryOperationsCallback(PVOID CallbackContext, PVOID Argument1, PVOID Argument2) { HANDLE hLogFile; NTSTATUS ntstatus; PEPROCESS pepProcess; ANSI_STRING asOperation; char *processName; UNICODE_STRING fileName; OBJECT_ATTRIBUTE...
1,331,171
the-stack-v2-dedup
C
#include<stdio.h> int main() { char str[50]; FILE *p1,*p2; p1=fopen("input.txt","r"); fgets(str,50,p1); p2=fopen("output.txt", "w"); fputs(str,p2); fclose(p1); fclose(p2); return 0; }
1,331,172
the-stack-v2-dedup
C
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* reverse_bits.c :+: :+: :+: ...
1,331,173
the-stack-v2-dedup
C
//{{BLOCK(bg) //====================================================================== // // bg, 512x256@8, // + palette 256 entries, not compressed // + 38 tiles (t|f reduced) not compressed // + regular map (in SBBs), not compressed, 64x32 // Total size: 512 + 2432 + 4096 = 7040 // // Time-stamp: 2010-12-06, 03:1...
1,331,174
the-stack-v2-dedup
C
/* * This is a RANDOMLY GENERATED PROGRAM. * * Generator: csmith 2.2.0 * Git version: dcef523 * Options: (none) * Seed: 2332130784 */ #include "csmith.h" static long __undefined; /* --- Struct/Union Declarations --- */ /* --- GLOBAL VARIABLES --- */ static int32_t g_25 = 0x1BC383C6L; static int32_t g_...
1,331,175
the-stack-v2-dedup
C
#include<stdio.h> int main() { int i,n,p[10],min,k=1,btime=0; int burst_t[10],temp,j,arr_t[10],wat_t[10],tt[10],sum=0; float wavg=0,tsum=0,wsum=0; printf("\nEnter the No. of processes :"); scanf("%d",&n); for(i=0; i<n; i++) { printf("\nEnter Arrival Time:\t"); ...
1,331,176
the-stack-v2-dedup
C
#ifndef _SEEK_H #define _SEEK_H #include "sys.h" #include "PID.h" #include "allocation.h" #include "timer.h" #include "delay.h" #include "math.h" void tracking(char direction,char artery,u16 speed,u8 mark_bit,u8 flag); void Turn(char direction,u16 speed); void differ_control(char artery,u16 speed); voi...
1,331,177
the-stack-v2-dedup
C
/* * PROGRAM ID : X25.c * PROGRAM NAME : X25 모듈 * AUTHOR : (주)ICA * COMMENT : X25 모듈 * HISTORY : 2013.10.10 강석. 최초작성 * */ #include <Common.h> /*============================================================================*/ /* * define constant */ /*------------------------------------------...
1,331,178
the-stack-v2-dedup
C
//========= Copyright © 1996-2004, Valve LLC, All rights reserved. ============ // // Purpose: // // $NoKeywords: $ //============================================================================= #ifndef STEAMTYPES_H #define STEAMTYPES_H #ifdef _WIN32 #pragma once #endif // Steam-specific types. Defined here so this ...
1,331,179
the-stack-v2-dedup
C
// Script File class EntitySpawner { //----------------------------------------------------------------------------------------- // private: static protected string _container_name; static protected int _entity_spawn_delay; static protected int _entity_despawn_delay; static protected int _recursion_depth_max; ...
1,331,180
the-stack-v2-dedup
C
/* ------------------------------------------------------------ NOMBRE DEL ARCHIVO: laboratorio1.c DESCRIPCION: Solucion a ejercicios basicos para conocer con el ambiente de programacion AUTOR: Daniel Lopez ULTIMA MODIFICACION: 11/01/2015 ------------------------------------------------------...
1,331,181
the-stack-v2-dedup
C
/***************************************************************************** ** ** Name: app_ble_ibeacon.h ** ** Description: Bluetooth BLE ibeacon advertiser application include file ** ** Copyright (c) 2014, Broadcom Corp., All Rights Reserved. ** Broadcom Bluetooth Core. Proprietary and confident...
1,331,182
the-stack-v2-dedup
C
// // Created by Ian F. Diks on 26.05.21. // #ifndef IANFD_DATAUTILS_H #define IANFD_DATAUTILS_H #include "data.h" #endif //IANFD_DATAUTILS_H
1,331,183
the-stack-v2-dedup
C
#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...
1,331,184
the-stack-v2-dedup
C
// Copyright 2015-16 Stefan Heule // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed...
1,331,185
the-stack-v2-dedup
C
#ifndef STEPPERMOTOR_H_ #define STEPPERMOTOR_H_ /* * steppermotor.h * * Created: 01/08/2021 18:25:15 * Author: swallace */ typedef struct StepperMotor { uint16_t seq; uint8_t pin; int8_t duty; } StepperMotor_t; StepperMotor_t * stepper_motor_init(StepperMotor_t *...
1,331,186
the-stack-v2-dedup
C
/* Mike Nickels Taylor Riccetti TCSS 422 Problem 4 */ #include <time.h> #include "OS.h" #define DEBUG 0 FIFO_Queue_p newProcesses; PriorityQ_p readyProcesses; PCB_p runningProcess; FIFO_Queue_p dyingProcesses; FIFO_Queue_p device1WaitingQueue; FIFO_Queue_p device2WaitingQueue; unsigned int sysStack...
1,331,187
the-stack-v2-dedup
C
#include <stdio.h> inline void put_u4b(int value, FILE *f) { unsigned char c0, c1, c2, c3; c0 = (value & 0x000000ff) >> 0; c1 = (value & 0x0000ff00) >> 8; c2 = (value & 0x00ff0000) >> 16; c3 = (value & 0xff000000) >> 24; fputc(c0, f); fputc(c1, f); fputc(c2, f); fputc(c3, f); } ...
1,331,188
the-stack-v2-dedup
C
#pragma once #ifdef __cplusplus #ifndef _LIBULTRASHIP_CLASSES_H #define _LIBULTRASHIP_CLASSES_H #include "resource/Archive.h" #include "resource/ResourceManager.h" #include "Context.h" #include "window/Window.h" #include "debug/Console.h" #include "debug/CrashHandler.h" #include "config/ConsoleVariable.h" #include "c...
1,331,189
the-stack-v2-dedup
C
// // RZNinjaMath.c // RZViewActionTest // // Created by Rob Visentin on 10/17/14. // Copyright (c) 2014 Raizlabs. All rights reserved. // #include "RZNinjaMath.h" #include <stdlib.h> #include <math.h> CGPoint const kRZNotAPoint = {HUGE_VALF, HUGE_VALF}; // private function prototypes void RZCGPathApplierFunctio...
1,331,190
the-stack-v2-dedup
C
/* * Class SHA1 */ #include "eif_macros.h" #ifdef __cplusplus extern "C" { #endif static EIF_TYPE_INDEX gen_type0_61 [] = {490,60,0xFFFF}; static EIF_TYPE_INDEX gen_type1_61 [] = {0,0xFFFF}; static EIF_TYPE_INDEX gen_type2_61 [] = {0,0xFFFF}; static EIF_TYPE_INDEX gen_type3_61 [] = {0,0xFFFF}; static EIF_TYPE_IND...
1,331,191
the-stack-v2-dedup
C
#include <stdio.h> int main(int argc, char *argv[]){ int matrix[4][4]; //matrix[0][0] = 0; //matrix[0][1] = 1; //matrix[0][2] = 2; //matrix[0][3] = 3; //matrix[1][0] = 1; //matrix[2][0] = 2; //matrix[3][0] = 3; matrix[1][1] = 2; matrix[1][2] = 3; matrix[1][3] = 4; matrix[2...
1,331,192
the-stack-v2-dedup
C
#ifndef NEURAL_NETWORK_H #define NEURAL_NETWORK_H #define LIN_ACTIVATION 0x0001 /* Linear activation, i.e. output = input */ #define SIG_ACTIVATION 0x0002 /* Sigmoidal activation, i.e. output = 1/(1+e^(-input)) */ #define STP_ACTIVATION 0x0003 /* Step (not available yet) */ #define BPROP_LEARNING 0x0011 /* Back ...
1,331,193
the-stack-v2-dedup
C
#include <linux/kernel.h> #include <linux/module.h> #include <sound/soc.h> #include <sound/soc-dai.h> #include <sound/control.h> #include <asm/delay.h> #include <asm/io.h> #include <linux/platform_device.h> #define UDA134X_RATES SNDRV_PCM_RATE_8000_48000 #define UDA134X_FORMATS (SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_...
1,331,194
the-stack-v2-dedup
C
#ifndef __SERIAL_PORT_FUNCTION_JUMP_TABLE_GLUE_H #define __SERIAL_PORT_FUNCTION_JUMP_TABLE_GLUE_H #include "board/serialPortList.h" #include <stdint.h> #include <stdbool.h> typedef void (*serialPortInitSpidFp_t)(serialPortId_t spid); typedef void (*serialPortEnableInterruptFp_t)(serialPortId_t spid, uint8_t Preemptio...
1,331,195
the-stack-v2-dedup
C
#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> int main() { //exam1(); //exam2(); //exam3(); exam4(); return 0; } int exam1() { int array[5]; int sum = 0; printf("5개의 정수 입력 : "); for (int i = 0; i < 5; i++) { scanf("%d", &array[i]); sum += array[i]; } printf("sum : %d", sum); return 0; } int...
1,331,196
the-stack-v2-dedup
C
#include<stdio.h> #include<string.h> void reverse(char s[]) { int c, i, j; for (i = 0, j = strlen(s)-1; i < j; i++, j--) { c = s[i]; s[i] = s[j]; s[j] = c; } } void itob(int n, char s[], int b) { int i, sign; if ((sign = n) < 0) /* record sign */ n = -n; i = 0; do { /* generate digits in reverse order */ s[i++] = n ...
1,331,197
the-stack-v2-dedup
C
#include <stdio.h> #include <stdint.h> struct point { int x, y; }; void foo(struct point p) { printf("%d,%d\n", p.x, p.y); } int main(int argc, char *argv[]) { (void)argc; (void)argv; foo((struct point){1,2}); return 0; }
1,331,198
the-stack-v2-dedup
C
/* * types/vserver.h * * Copyright (C) 2012-2013 Peng Jianzhang * * Author: Peng Jianzhang * Email: pengjianzhang@gmail.com * Time: 2013.2.11 * */ #ifndef _TYPES_VSERVER_H #define _TYPES_VSERVER_H #include "common/list.h" #include "common/types.h" #define VS_IP_NUM_MAX 16 struct vserver { struct list_head...
1,331,199