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
#![allow(dead_code)] | |
extern crate rand; | |
use std::cmp::Ord; | |
use std::cmp::Ordering; | |
use std::fmt::Debug; | |
use std::iter::Iterator; | |
use std::iter::IntoIterator; | |
use rand::Rng; |
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
/* | |
*http://stackoverflow.com/questions/23317646/why-is-strcpy-unsafe-in-c | |
We can use strncpy instead of strcpy. It's safer. | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#define MAX_SIZE 10 | |
typedef struct teacherData{ |