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
What is string function c?
a parameter passed between a calling program and a called program a) variable b) constant c) argument d) all of the above
Write a program for finding factorial of a number.
What is call by reference in functions?
Why are algorithms important in c program?
How will you print TATA alone from TATA POWER using string copy and concate commands in C?
Explain the use of function toupper() with and example code?
what is different between auto and local static? why should we use local static?
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.
What is data type long in c?
Explain the priority queues?
Is printf a keyword?
What is scope rule in c?
Tell us something about keyword 'auto'.
Explain how do you sort filenames in a directory?