Skip to content
Snippets Groups Projects
Commit 6fe2f4d9 authored by nilfit's avatar nilfit
Browse files

add overflow example

parent 74d3c232
No related branches found
No related tags found
No related merge requests found
fn main() {
use std::io::{stdin, Read};
let mut data = [0; 1];
stdin().read_exact(&mut data[..]).unwrap();
let i = data[0] as i8;
let _overflowed: i8 = i - 1i8;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment