+ 1

What is the main defferences??

#include <stdio.h> int main() { int x,y; x = 10,20,30; printf("%d\n", x); y=(10,20,30); printf("%d",y); return 0; } OUTPUT: 10 30

18th May 2022, 7:24 AM
Gulpam Doyel
Gulpam Doyel - avatar
2 Réponses
+ 4
Read this to understand what comma operator is, when comma token in code acts as separator and when it acts as operator. https://sillycodes.com/comma-operator-in-c-programming/
18th May 2022, 8:27 AM
Ipang
+ 2
Output is 10 30 Not 30 10 (may be typo mistake!!)
18th May 2022, 8:44 AM
Jayakrishna 🇮🇳