Swastik Baranwal Posted on Mar 21, 2020 • Edited on Mar 21, 2020 Predict the Output #c #challenge #beginners Predict the output of the following code and tell me why this works: #include <stdio.h> int main() { int x = 10; while (x --> 0) { printf("%d ", x); } return 0; } Enter fullscreen mode Exit fullscreen mode The one who answers well will get a follow back! Top comments (2) Subscribe Submit Preview Dismiss Collapse Expand Swastik Baranwal Swastik Baranwal Swastik Baranwal Follow Open Source Engineer Email swstkbaranwal@gmail.com Location Delhi, India Pronouns He/him Joined Oct 7, 2019 • Mar 21 '20 Dropdown menu Copy link Hide Great! Can you also tell why --> works? Swastik Baranwal Swastik Baranwal Swastik Baranwal Follow Open Source Engineer Email swstkbaranwal@gmail.com Location Delhi, India Pronouns He/him Joined Oct 7, 2019 • Mar 21 '20 Dropdown menu Copy link Hide Yeah correct but --> works because the lexer ignores whitespace and x-- is parsed. Code of Conduct • Report abuse
Top comments (2)
Great! Can you also tell why
-->works?Yeah correct but
-->works because the lexer ignores whitespace andx--is parsed.