int i;
i=2;
i++;
if(i=4)
{
printf(i=4);
}
else
{
printf(i=3);
}
output of the program ?

Answer Posted / sukant

The syntax for the if statement is also not correct..
The conditional assignment includes two == rather than a single =...
so,, the if statement wont consider that as a conditional statement and come out of it..
And, it will give an error in the printf(i=3); as the syntax is not apt.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I send escape sequences to control a terminal or other device?

618


What is modeling?

651


Is null always equal to 0(zero)?

589


Is using exit() the same as using return?

684


What is the use of header?

629






How will you declare an array of three function pointers where each function receives two ints and returns a float?

787


How can I sort a linked list?

640


What are the 5 elements of structure?

575


What is the difference between functions getch() and getche()?

626


What is the difference between far and near in c?

607


Why doesnt the call scanf work?

679


What is function and its example?

632


What is data structure in c and its types?

599


Write a program in "C" to calculate the root of a quadratic equation ax^2+bx+c=0, where the value of a,b & c are known.

1731


How can you determine the maximum value that a numeric variable can hold?

643