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

Explain what is the benefit of using an enum rather than a #define constant?

728


Can a variable be both const and volatile?

678


What is function what are the types of function?

563


What is d scanf?

597


What is the purpose of type declarations?

683






What is scope rule of function in c?

554


What is the scope of local variable in c?

582


what is associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;

1892


What is the use of parallelize in spark?

580


Given a valid 24 hour format time find the combination of the value and write a program ,do not hard the value and if any other inputs provided should work with the logic implemented Input: 11:30 Output: 13:10 Input: 18:25 Output: 21:58

1123


Can i use “int” data type to store the value 32768? Why?

758


Why flag is used in c?

653


how can use subset in c program and give more example

1505


What is operator precedence?

647


Differentiate between ordinary variable and pointer in c.

621