473,395 Members | 2,006 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

what is the output in if-else statement

int x=3,y,z;
y=x=10;
z=x<10;
printf("x=%d y=%d z=%d,x,y,z");
Jan 7 '16 #1
2 1077
weaknessforcats
9,208 Expert Mod 8TB
I don't see any if-else in here.
Jan 7 '16 #2
donbock
2,426 Expert 2GB
There are a couple of things wrong with your printf statement. Change it to...
Expand|Select|Wrap|Line Numbers
  1. printf("x=%d y=%d z=%d\n",x,y,z);
I moved the close-quote to the left so that x,y,z is outside the quoted string.
I terminated the format string with a newline. This insures the output appears even if that port has buffered output.

What do you get when you run the program?
Jan 7 '16 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Jay Wolfe | last post by:
Hi, I came across this statement and it has a confusing element. I know the whole '?:" construct and the assignment within the compare, but what's up with the comma? All the variables here are...
2
by: Frank | last post by:
I am reading other people's code and come across this statement. Does it mean phase revolve arround 0,1,2 and 3 & 3 makes 0? Thank you. phase = 0; for (i = 0; i <= 100; i++) {...
4
by: riceyeh | last post by:
Hi, When reading the source code of dojo, it uses the following statement quite often. What does it mean? What I do not understand is it has a function definition enclosed in a pair of parenthesis...
1
by: Readon Shaw | last post by:
return &dhcpInit; where dhcpInit() is a function decleared before. would dhcpInit be called?
6
by: raghu | last post by:
Hello This is raghu. And I want to know about the meaning of the statement given below log_txt( __FILE__, __LINE__, ##argList); in above statement what does FILE ,LINE ##argList mean. I want to...
5
by: sharmilah | last post by:
Hi all I want to specify an OR condition in an if statement. Can anyone please tell me how this can be done. I've tried this but it does not work <? if (($add!=1) or (!empty($row))) { echo...
1
by: ahmee | last post by:
iwanna known about what goto statement is used for with an exmple
1
by: annie8508 | last post by:
Is there a way to email multiple forms by a primary key or using a ifelse statement in the Coding area? Currently, I only have this form open "frmStandard" Private Sub Email_Click() ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.