C Puzzle

What is the output of the following code snippet?
#include <stdio.h>
void main(){
printf("%d",(12%2));
}
Output:
0

Explanation:
% is the mod operator in c, which is used to find remainder of an integer division.

Comments

Post a Comment

Popular posts from this blog

Python Tips -06

Python Tips - 03