Why 013+17 is 28 instead of 30?

Viewed 55

In PHP

<php
echo 013+17; // Output: 28
?>

or In C

#include <stdio.h>
int main() {
printf("%d",013+17); // Output: 0
return 0;
}

Or In JavaScript

x=013+17;
console.log(x);

All returns 28, instead of 30. Can someone please explain why? Thanks!

0 Answers
Related