+ 4

Can you print anything without using semicolon in C language ? if yes, how ?

21st Oct 2019, 9:19 AM
Rachit Sharma
15 Respostas
+ 5
I think a feed post will be more effective than the discussion we're having here :)
23rd Oct 2019, 7:58 AM
HumayrašŸ‡§šŸ‡©
HumayrašŸ‡§šŸ‡© - avatar
+ 4
Why you ask a question when you know the answer? you can search the forum for something similar, every once in a while someone came up with something like this. (Edit) https://www.sololearn.com/Discuss/1729434/?ref=app
21st Oct 2019, 9:36 AM
Ipang
+ 2
I don't understand.
21st Oct 2019, 9:26 AM
Programmer Jr.
Programmer Jr. - avatar
+ 2
Yeah it's possible to print anything without semicolon.... #include<stdio.h> int main() { if(printf("hello frnds how you all")) {} return 0; } It's a interview questions . Note:condition if is a method{} curlybraces don't forget Thank you guy's
21st Oct 2019, 1:20 PM
aejaz ahmed
aejaz ahmed - avatar
+ 1
Nope. You can try using python.
21st Oct 2019, 9:23 AM
Programmer Jr.
Programmer Jr. - avatar
+ 1
But what's the point of doing that?
21st Oct 2019, 9:51 AM
xyz$
+ 1
Gellert ya right thinking of the same thing
21st Oct 2019, 9:52 AM
Programmer Jr.
Programmer Jr. - avatar
+ 1
Gellert why not spread knowledge ? isn't that a good thing to do ?
21st Oct 2019, 9:53 AM
Rachit Sharma
+ 1
void main() { if(printf ("hello")){} }
22nd Oct 2019, 11:40 AM
Somvir Dhaka
Somvir Dhaka - avatar
0
what if I told you there is a way using switch statement among various other ways !
21st Oct 2019, 9:24 AM
Rachit Sharma
0
We can do it using the switch statement in C language, it's a simple piece of code.
21st Oct 2019, 9:28 AM
Rachit Sharma
0
Yes, I know but I thought there might be other ways as well that I might not be aware of :)
21st Oct 2019, 9:37 AM
Rachit Sharma
0
Exactly Vandana that's correct ! but there are other methods as well
21st Oct 2019, 9:41 AM
Rachit Sharma