본문 바로가기
개발 🛠💻/운영체제 & CS

연산 오버플로우

by 승지 T-Story 2022. 7. 21.

https://blog.naver.com/PostView.naver?blogId=tipsware&logNo=221046166467&parentCategoryNo=&categoryNo=50&viewDate=&isShowPopularPosts=true&from=search 

 

연산시 발생하는 오버플로우에 대하여

: C 언어 관련 전체 목차 http://blog.naver.com/tipsware/2210108319691. 자료형에 따른 연산 결과 아래...

blog.naver.com

 

 

 

 

 int intMax1 = int.MaxValue;
 int intMax2 = int.MaxValue;
 
 long longMax1 = 0;
 
 longMax1 += intMax2 * intMax3; // longMax1 = longMax1 + intMax2 * intMax3;

 

 

  위 코드는 오버 플로우가 날까??

댓글