Multiply two integers without using multiplication, division and bitwise operators.
To multiply x and y, recursively add x y times.
Trigraph characters in C language
- C supports the following 9 trigraph characters.
Trigraph sequence | Equal character |
??= | # |
??( | [ |
??) | ] |
??/ | \ |
??< | { |
??> | } |
??! | | |
??’ | ^ |
??- | ~ |
1
2
3
4
5
6
| ??=include<stdio.h> int main() ??< printf ( "Hello??/nWorld" ); return 0; ??> |
The trigraphs pre-processor changes the above code as
1
2
3
4
5
6
| #include<stdio.h> int main() { printf ( "Hello\nWorld" ); return 0; } |
Trigraphs are not commonly supported by all the compilers. Some compilers support an option to turn recognition of trigraphs on. Some issues warnings when they encounter trigraphs in the source files.
Please write comments if you find any of the above code/algorithm incorrect, or find better ways to solve the same problem.
No comments:
Post a Comment