This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdlib.h> | |
| #include <stdio.h> | |
| struct car{ | |
| char make[30]; | |
| char model[30]; | |
| int year; | |
| int mileage; | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <string.h> | |
| #include <stdlib.h> | |
| struct studentRecord | |
| { | |
| char lastName[100]; | |
| char firstName[100]; | |
| long studentId; | |
| double mark; | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| interface Likeable { | |
| void like(); | |
| int getLikes(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| TAGS := .tags | |
| OUT := out | |
| DEBUG_CFLAGS:=-Wextra -Wall -Wshadow -Wno-strict-aliasing -Woverflow -Wno-unused-parameter -Wno-unused-variable -g -pipe -march=native | |
| CFLAGS:= -pipe -O2 -march=native | |
| .PHONY: default debug tags out_run | |
| out_run: run | |
| ./$(OUT) | |
| out: | |
| $(CC) $(CFLAGS) *.c -o $(OUT) | |
| debug: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class Foo implements Cloneable { | |
| static class Bar { | |
| public int i; | |
| public Bar() { } | |
| } | |
| static class Qux { | |
| public int a[]; | |
| public int b; | |
| public Qux() { } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| git branch --list -q | sed 's/[\*\ ]*//g' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.LinkedList; | |
| public class Lucas { | |
| public static int lucas(int n){ | |
| switch(n){ | |
| case 0: | |
| return 2; | |
| case 1: | |
| return 1; | |
| default: | |
| if (n < 0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| trig: trig.cc | |
| g++ -o trig trig.cc -Wall -Wextra -pipe -lm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Question 5 | |
| * All of these classes should be public and in their own file. | |
| */ | |
| class Shape { | |
| protected double x,y; | |
| public Shape(double x, double y){ | |
| this.x=x; | |
| this.y=y; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <bits/wordsize.h> | |
| #include <stdio.h> | |
| #include <inttypes.h> | |
| int main(void) | |
| { | |
| uint64_t f, b, q, *foo, *bar, *qux; | |
| foo=&f, bar=&b, qux=&q; | |
| printf("size of a pointer is %d bytes\n",__WORDSIZE/8); |