Hey there! We receieved your request
Stay Tuned as we are going to contact you within 1 Hour
One of our academic counsellors will contact you within 1 working day.
Click to Chat
1800-5470-145
+91 7353221155
Use Coupon: CART20 and get 20% off on all online Study Material
Complete Your Registration (Step 2 of 2 )
Sit and relax as our customer representative will contact you within 1 business day
OTP to be sent to Change
Most Urgent C++ Problems --
Give definitions of the following : -
a)simple if
b)if..else
c)if..else..if
d)switch
Please give only and only definitions.No examples nothing else.
Dear nitin,
if ( TRUE ) Execute the next statement
if ( TRUE ) { // Execute these statements if TRUE } else { // Execute these statements if FALSE } if ( <condition> ) { // Execute these statements if <condition> is TRUE } else if ( <another condition> ) { // Execute these statements if <another condition> is TRUE and // <condition> is FALSE } The switch statement provides a convenient alternative to the if when dealing with a multi-way branch. Suppose we have some integer value called test and want to do different operations depending on whether it has the value 1, 5 or any other value, then the switch statement could be employed:- switch ( test ) { case 1 : // Process for test = 1 ... break; case 5 : // Process for test = 5 ... break; default : // Process for all other cases. ... }Please feel free to ask your queries here. We are all IITians and here to help you in your IIT JEE preparation. All the best. Win exciting gifts by answering the questions on Discussion Forum. So help discuss any query on askiitians forum and become an Elite Expert Leagueaskiitian. Now you score 5+15 POINTS by uploading your Pic and Downloading the Askiitians Toolbar respectively : Click here to download the toolbar.. Askiitians Expert Sagar Singh B.Tech, IIT Delhi
if ( TRUE ) { // Execute these statements if TRUE } else { // Execute these statements if FALSE }
if ( <condition> ) { // Execute these statements if <condition> is TRUE } else if ( <another condition> ) { // Execute these statements if <another condition> is TRUE and // <condition> is FALSE }
switch ( test ) { case 1 : // Process for test = 1 ... break; case 5 : // Process for test = 5 ... break; default : // Process for all other cases. ... }Please feel free to ask your queries here. We are all IITians and here to help you in your IIT JEE preparation. All the best. Win exciting gifts by answering the questions on Discussion Forum. So help discuss any query on askiitians forum and become an Elite Expert Leagueaskiitian. Now you score 5+15 POINTS by uploading your Pic and Downloading the Askiitians Toolbar respectively : Click here to download the toolbar.. Askiitians Expert Sagar Singh B.Tech, IIT Delhi
I got the definition of switch statement from your answer.But what can I write in the definition of simple if,if-else,if-else-if?There is no need to give examples.I know these things but just don't know the definition.
Thanks for you replies in this and other questions
Get your questions answered by the expert for free
You will get reply from our expert in sometime.
We will notify you when Our expert answers your question. To View your Question
Win Gift vouchers upto Rs 500/-
Register Yourself for a FREE Demo Class by Top IITians & Medical Experts Today !