Can you print “hello world” without using a semicolon in C?
YES, you can print hello world without using semicolons in C.
Method 1: Using if
- #include <stdio.h>
- int main() {
- if(printf("hello world")){}
- }
Method 2: Using While
- #include <stdio.h>
- int main() {
- while(!printf("hello world")){}
- }
Output:
hello world
Comments
Post a Comment