What the scanf function do?what is the output for
if(scanf("%d",&i)==1)//input value is 10
{
printf("hi");
}
else
{
printf("bye");
}

Answer Posted / vishal pitaliya

in case of integer value scanf function
return
1 if value is +ve
0 if negative

so 10 is +ve it would return 1

and in the if statement it will compare with another value
specied in the if statement .
so condition is true 1==1
so output is hi
THANK YOU.........

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

dear sir, i want last 5yrs question papers of clerical exam of sbi

1820


you have to establish a cosmetic industry in India & how you would like to expand in the middle east ?what role of culture will be there in your HR practices n also highlight an employee management issue you would face n give remedies as to now would you tackle those issues.

1675


plz send me eng apti ques and sbi clarical ques plz... bikranz4u@yahoo.com

1804


why we need to measure 0.5 micron particals in clean room as used HEPA filters are having 99.97% efficincy.

1847


tell me about your create own plan.

1716






what should i do i can't remove my weakness?

1774


how to clearify and solve the english comprehensive questions?

1636


What is compounding infoobjects?

1070


I didn't have of visa of fiancial K1 for the USA, can I proceeded for the visa K 3 of the marriage? _

1580


if rtd temp. is 45 degree then what would be the resistance according.(if you dont have temp. vs resistance chart)

1516


linux advantages and important questions &anwers

2430


contractor have done the work with out any information and blamed me that they got permission from my side. Now how do i write a letter to my boss against contractor

2804


Mention any two learner factors in second language acquisition.

665


Give two activities for improving the skill of speaking.

645


what is filtration??? what is decantation??? what will be the difference between the products of filtration and decantation???

2890