Skip to content

Instantly share code, notes, and snippets.

View 1995parham's full-sized avatar
🙈
Everything is Awesome

Parham Alvani 1995parham

🙈
Everything is Awesome
View GitHub Profile
@1995parham
1995parham / scanf-fun.go
Created July 22, 2019 20:15
Have fun with Scanf
package main
import "fmt"
func main() {
var s []int
for {
var n int
fmt.Println("Please enter the number or zero to exit")
@1995parham
1995parham / scanf-1.c
Created December 13, 2019 12:56
How `scanf` reads input.
#include <stdio.h>
int main(void) {
int count = 0;
while(1) {
printf("count: %d\n", count++);
int i;
int n = scanf("%d",&i);
if (n != 1) {
@1995parham
1995parham / students.c
Last active January 2, 2020 15:25
Students declarations and implementation of [W2](https://github.com/aut-ce/C-Workshops).
struct students *students_new(void) {
struct students *stds = malloc(sizeof(struct students));
stds->length = 0;
stds->head = NULL;
return stds;
}
void students_push_back(struct students *students, struct student *student) {
struct students_el *el = malloc(sizeof(struct students_el));
@1995parham
1995parham / Makefile
Created September 12, 2022 16:44
[Force](https://github.com/davidfrantz/force) Makefile on Archlinux
##########################################################################
#
# This file is part of FORCE - Framework for Operational Radiometric
# Correction for Environmental monitoring.
#
# Copyright (C) 2013-2020 David Frantz
#
# FORCE 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, or