473,385 Members | 1,402 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,385 software developers and data experts.

C ques

how to execute both if and else case,tell me the condition
Jul 22 '07 #1
4 2593
Meetee
931 Expert Mod 512MB
how to execute both if and else case,tell me the condition
I am not getting your question clearly. Both if and else?? Kindly read posting guidelines before posting your question and give some more details please.

Regards
Jul 22 '07 #2
sicarie
4,677 Expert Mod 4TB
how to execute both if and else case,tell me the condition
The condition is what is checked to see if the 'if' or the 'else' case is taken.

Check this out.
Jul 23 '07 #3
Silent1Mezzo
208 100+
how to execute both if and else case,tell me the condition
It's not possible to execute both the 'if' and 'else' case. If the 'if' case it true then it'll execute the code inside of that block and then jump out of the if/else statement. If the 'if' statement is false then the it'll go to the 'else' statement and execute that block of code.
Jul 23 '07 #4
JosAH
11,448 Expert 8TB
Is there a semi-colon following that 'else' keyword directly? As in:

Expand|Select|Wrap|Line Numbers
  1. int x= 1;
  2. if (x == 1)
  3.    printf("x=1\n");
  4. else;
  5.    print("x!=1\n");
  6.  
kind regards,

Jos
Jul 23 '07 #5

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

Similar topics

5
by: news | last post by:
Hi, I am pretty new to PHP I want to do the following but I have been unable to find good info/ or sample code on it; please help; - retrieve a gif/jpeg image using PHP from another site -...
1
by: news | last post by:
Hi again, I am pretty new to PHP (I use to be a Visual Basic 6 addict) I want to do the following but I have been unable to find good info/ or sample code on it; please help; - retrieve a...
2
by: Hal Halloway | last post by:
I'm trying to go from PHP4 to PHP5, all seemed OK until I tried to connect to a MYSQl DB. Then I get the error message: Fatal error: Call to undefined function mysql_pconnect() in C:\Program...
1
by: ryan | last post by:
the win32 python extentions don't seem to have "SysParametersInfo()" and i need it to set the wallpaper in windows. cyptes has a "SysParametersInfoA()" function but wont let me use the...
6
by: suenacita1 | last post by:
Hi. I'm a masters student at the George Washington University currently taking an Open Source Software Development course. One of our assignments was to do a presentation on an open source project...
0
by: Pete Wilson | last post by:
C++ instructor says, emphatically: end of file is always a NUL char in the file; count on it. When program sees a NUL, that's it, that's the end of file. And testing for NUL is always the right...
0
by: codyrush | last post by:
Good morning. I am brand-new at SQL Server 2000. In fact, I merely have a copy of SQL Server 2000 Developer Edition. Can anyone point me to a good site for learning the very basics of SQL...
1
by: ajayp | last post by:
I am new to DB2 and I am trying to implement a tool using DB2 Administrative (C API) API.My requirement is for the tool to query the DB2 servers to get the list of databases in each of the...
10
by: action! | last post by:
this is my C Programming homework, It wants me to input 10! and output the follow result 10! ¡õ 10 * 9! ¡õ 9 * 8! ..................
6
by: GrispernMix | last post by:
//ques and and level order traversal file name: lab6_build_leaf_up.cpp Instructions:
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.