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

Answer Posted / asit mahato

The conditional test if(i=4) is true for evrey non zero
value of i.As here i=3 here execute the if statement.But
printf can't print nothing because we have not mation the
proper syntax of printf.if we replace
printf(i=4)by printf("i=4")
it will give the following output:
i=4

Is This Answer Correct ?    15 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is string function c?

561


a parameter passed between a calling program and a called program a) variable b) constant c) argument d) all of the above

646


Write a program for finding factorial of a number.

626


What is call by reference in functions?

552


Why are algorithms important in c program?

612






How will you print TATA alone from TATA POWER using string copy and concate commands in C?

916


Explain the use of function toupper() with and example code?

647


what is different between auto and local static? why should we use local static?

634


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.

1717


What is data type long in c?

619


Explain the priority queues?

617


Is printf a keyword?

751


What is scope rule in c?

597


Tell us something about keyword 'auto'.

657


Explain how do you sort filenames in a directory?

598