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...


main() {
int x=2, y=4
if ((x==2||y==4)
x++
y++
if (y==4+1)
{
x=x+y;
}
y++;
printf("The values of x and y are %d and %d."x,y);
}
What is the output?


Answers were Sorted based on User's Feedback



main() { int x=2, y=4 if ((x==2||y==4) x++ y++ if (y==4+1) ..

Answer / pandu

x=8,y=6

Is This Answer Correct ?    20 Yes 3 No

main() { int x=2, y=4 if ((x==2||y==4) x++ y++ if (y==4+1) ..

Answer / rajesh

Error will be occur because the variable declaration
does`t intilized terminate symbol(;), and again same
mistake in line 5 and line 6.

Is This Answer Correct ?    7 Yes 0 No

main() { int x=2, y=4 if ((x==2||y==4) x++ y++ if (y==4+1) ..

Answer / ganesh bankar

There is a errsor at compile time because some statements
are not terminated by ";".

Is This Answer Correct ?    5 Yes 0 No

main() { int x=2, y=4 if ((x==2||y==4) x++ y++ if (y==4+1) ..

Answer / moolshankershukla

if use terminator after x++ and y++ and y=4 and ) missing
and {} missing then out put is
x=8 and y=6.
correct answer like this :
main ()
{
int x=2, y=4;
if ((x==2||y==4))
{
x++;
y++;
}
if (y==4+1)
{
x=x+y;
}
y++;

printf("The values of x and y are %d and %d."x,y);
}

out put is
x=8 and y=6.

Is This Answer Correct ?    5 Yes 0 No

main() { int x=2, y=4 if ((x==2||y==4) x++ y++ if (y==4+1) ..

Answer / kirthi s

x=2.y=4

Is This Answer Correct ?    2 Yes 14 No

Post New Answer

More C Interview Questions

A MobileNumber is a VIP number if it satisfy the following conditions. The operator should be Vodafone. Atleast one 0 (Zero) should be exist in mobile number. The number should not end with 8. The single digit sum of all the digits in the number should be equal to 9. For example if the number is 9876543210, the sum is 9+8+7+...+1+0 = 45. Sum of 4+5 = 9. Write a method: private boolean isVIPMobileNumber(String mobileNum, String operator) mobileNum phone number operator mobile operator as bsnl, Vodafone

1 Answers  


Difference between fopen() and open()?

3 Answers   Aricent,


What is the method to save data in stack data structure type?

0 Answers  


What is character constants?

0 Answers  


What is #include stdio h?

0 Answers  


what is the value of 'i'? i=strlen("Blue")+strlen("People")/strlen("Red")-strlen("green")

7 Answers   Cadence, JNTU, Zen Technologies,


Do you have any idea how to compare array with pointer in c?

0 Answers  


is it possible to create your own header files?

0 Answers  


can we define a function in structure?

2 Answers  


Write a program to check palindrome number in c programming?

0 Answers  


Explain main function in c?

0 Answers  


Reverse the part of the number which is present from position i to j. Print the new number. eg: num=789876 i=2 j=5 778986

1 Answers  


Categories