Literals/Integer: Difference between revisions
Content deleted Content added
m →{{header|E}}: closing tag |
→{{header|C}}: create C++ example |
||
Line 64: | Line 64: | ||
<lang c>#include <stdio.h> |
<lang c>#include <stdio.h> |
||
int main() |
int main(void) |
||
{ |
{ |
||
printf("%s\n", |
printf("%s\n", |
||
Line 75: | Line 75: | ||
C has no way of specifying integers in binary (if there's something like <tt>0b...</tt>, it is not |
C has no way of specifying integers in binary (if there's something like <tt>0b...</tt>, it is not |
||
standard) |
standard) |
||
=={{header|C++}}== |
|||
The same comments apply as to the [[#C|C example]]. |
|||
<lang c>#include <iostream> |
|||
int main() |
|||
{ |
|||
std::cout << ( (727 == 0x2d7) && |
|||
(727 == 01327) ? "true" : "false") |
|||
<< std::endl; |
|||
return 0; |
|||
}</lang> |
|||
=={{header|Common Lisp}}== |
=={{header|Common Lisp}}== |