+ 2

How to solve?????😑

Can someone explain how to solve this. It’s really confusing and these are the problems I struggle most with. Can’ get a good grasp on it. What is the output of this code? Int c=0; If(c) printf(“%d”,c=0); else Printf(“%d”,c=1) printf(“%d\n”,c)

30th Jul 2019, 6:28 PM
SauceDough
SauceDough  - avatar
5 Respuestas
+ 2
%d is used to format the output in C programming language. If we want to print an integer, we use %d. It is called a format specifier. The code attached with the post also has the explanation. I hope it helps :) https://code.sololearn.com/cx2974w5Tmue/?ref=app
30th Jul 2019, 6:46 PM
Muhammad Shehzad
Muhammad Shehzad - avatar
+ 2
thanks really appreciate the help🙌🙌🙌
30th Jul 2019, 7:02 PM
SauceDough
SauceDough  - avatar
+ 1
Use relational operators ! (c==0) That makes more sense IMHO 🤔
31st Jul 2019, 4:21 AM
Sanjay Kamath
Sanjay Kamath - avatar
0
hey i was wondering if u want to try get a victory royale some time thanks
8th Jun 2020, 2:27 AM
kylan.vandervoet