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
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 |
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 |
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 |
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
Difference between fopen() and open()?
What is the method to save data in stack data structure type?
What is character constants?
What is #include stdio h?
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?
is it possible to create your own header files?
can we define a function in structure?
Write a program to check palindrome number in c programming?
Explain main function in c?
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