Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

#include<conio.h>
#include<stdio.h>
void main()
{
int i;
if(1,0,2,3)
{
printf("if");
}
else
{
printf("else");
}
getch();
}
Can any body tell the answer of this question with explanation?

Answer Posted / shyamkumar1221

the question might be like this
#include<conio.h>
#include<stdio.h>
void main()
{
int i=1;
intj=0,k=2,l=3;
if(i,j,k,l)
{
printf("if");
}
else
{
printf("else");
}
getch();
}
the output would be if
since in the if ()we are using comma operator.the precedence
is left to right...since in the if the we get output as 3
which is non zero.the if statement is true and if statement
will be printed

Is This Answer Correct ?    11 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how many key words availabel in c a) 28 b) 31 c) 32

1010


What are global variables and explain how do you declare them?

1029


Explain what are reserved words?

1038


How can I invoke another program or command and trap its output?

1045


Can include files be nested? How many levels deep can include files be nested?

1085


What is the purpose of main( ) in c language?

1088


how could explain about job profile

1856


What is #line used for?

987


Explain what is a static function?

1046


Write a simple code fragment that will check if a number is positive or negative.

1099


Describe the complexity of Binary search, Quicksort and various other sorting and searching techniques..

986


What is the package for freshers(Non IIT) in amazon(hyderabad). And what is the same for those who are a contract employee.

4240


How do you construct an increment statement or decrement statement in C?

1175


Was 2000 a leap year?

1002


What is the explanation for the dangling pointer in c?

1061