What the scanf function do?what is the output for
if(scanf("%d",&i)==1)//input value is 10
{
printf("hi");
}
else
{
printf("bye");
}
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / harshitha
scanf function stores the value in a particular address.
and the output for the above program is "bye".
| Is This Answer Correct ? | 2 Yes | 2 No |
Answer / srinivas
Ans: hi
Description:scanf() return number of succesful reading from
STDIN.in this case 1 input read from console.
| Is This Answer Correct ? | 1 Yes | 4 No |
SSC ? Grade ?D? Exam ENGLISH CLOSET TEST TEST ? 14
hi my bank of baroda written test will held on 13th march so let me know all appti question also mths question pls send me queston with answer my mail id is amrapalimohite@yahoo.com
what are the qualities needed for a probationary officer?
send me aptitude question paper at my email id
Who is the top scorer in IPL 2?
why are you best of friend.
how can disable lancard trought cmd..
what is html
Brief history of Ambedkar and Baghat Singh
how to introduce ourself ?
send state bank of india clerical exam test papers questions and answers in all subject to vijeesh_tv@yahoo.com
who is the prime minister of india?