This file contains 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> | |
main(int argc, char *argv[]) | |
{ | |
int c; | |
printf("Number of command line arguments passed: %d\n", argc); | |
for (c = 0; c < argc; c++) | |
printf("%d. Command line argument passed is %s\n", c + 1, argv[c]); |
This file contains 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
// | |
// sha256_test.c | |
// | |
// | |
// Created by Kyle on 8/10/13. | |
// | |
// | |
/* | |
* Simple MD5 implementation |
This file contains 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 <math.h> | |
double fun(double x) | |
{ | |
return log(x); // base-e logarithm! } | |
} | |
// usage | |
int main() |
This file contains 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
FLWS | |
FCTY | |
FCCY | |
SRCE | |
FUBC | |
VNET | |
JOBS | |
EGHT | |
AVHI | |
SHLM |
This file contains 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.security.Key; | |
import javax.crypto.Cipher; | |
import javax.crypto.KeyGenerator; | |
public class AESexample { | |
private String keySize; | |
private Key aesKey; | |
This file contains 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
// | |
// hello1.c | |
// | |
// | |
// Created by Kyle on 8/31/13. | |
// | |
// | |
#include <stdio.h> | |
main() |
This file contains 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
/* C program to find multiplication table up to 10. */ | |
#include <stdio.h> | |
int main() | |
{ | |
int n, i; | |
printf("Enter an integer to find multiplication table: "); | |
scanf("%d",&n); | |
for(i=1;i<=10;++i) | |
{ | |
printf("%d * %d = %d\n", n, i, n*i); |
This file contains 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
/* Program to find roots of a quadratic equation when coefficients are entered by user. */ | |
/* Library function sqrt() computes the square root. */ | |
#include <stdio.h> | |
#include <math.h> /* This is needed to use sqrt() function.*/ | |
int main() | |
{ | |
float a, b, c, determinant, r1,r2, real, imag; | |
printf("Enter coefficients a, b and c: "); | |
scanf("%f%f%f",&a,&b,&c); |
This file contains 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
/* Source code to find ASCII value of a character entered by user */ | |
#include <stdio.h> | |
int main(){ | |
char c; | |
printf("Enter a character: "); | |
scanf("%c",&c); /* Takes a character from user */ | |
printf("ASCII value of %c = %d",c,c); | |
return 0; | |
} |
This file contains 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
/* The file name of this C program should be sourcecode.c */ | |
#include<stdio.h> | |
int main(){ | |
FILE *fp; | |
char c; | |
fp = fopen("sourcecode.c","r"); | |
do{ | |
c= getc(fp); | |
putchar(c); |