+ 1
What is Comma Operator? Plz Explain What is its Mechanism?
5 Answers
+ 4
Lisa and Leeroy Mokua there really is a comma operator in C, C++, JavaScript, and other languages (but not Java). https://en.wikipedia.org/wiki/Comma_operator
It is mostly used in for loops to insert multiple expressions for initialization and/or the loop update to update multiple variables.
+ 3
There is no comma operator.
10 and 20 are ignored, x will be 30.
What are you trying to do? Which output do you expect?
+ 3
I show you some magic.. https://code.sololearn.com/ciUdbbmi6D7m/?ref=app
+ 2
It's not an operator.
Naturally "printf" is a function in the "studio.h" file.
And functions take parameters, and if there is more than one parameter they are separated by commas and that's what exactly it is.
For more information you can do more research on how the printf works there is alot of information about it out there.
+ 1
Brian I guess I also have to do research too.