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



What the scanf function do?what is the output for if(scanf("%d",&i)==1)//input value ..

Answer / santhi

bye

Is This Answer Correct ?    8 Yes 3 No

What the scanf function do?what is the output for if(scanf("%d",&i)==1)//input value ..

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

What the scanf function do?what is the output for if(scanf("%d",&i)==1)//input value ..

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

What the scanf function do?what is the output for if(scanf("%d",&i)==1)//input value ..

Answer / arvind

scanf is a standard input function in "C" language. help of
this function we input values. the ans. of avove if
statement is bye

Is This Answer Correct ?    1 Yes 1 No

What the scanf function do?what is the output for if(scanf("%d",&i)==1)//input value ..

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

Post New Answer

More English Interview Questions

please send some sample or previous papers of karur vysya bank engineering recruitment

0 Answers   Godrej,


when will you seen after five years?

0 Answers   Genpact,


which type of paragrph questions and answers me 24/7

0 Answers  


_ model shows how the network function of a computer ought to be organize?

2 Answers   TATA,


what do you know about tcs company

2 Answers   TCS,






how was ur last weekend

3 Answers   Genpact,


how disable usb device in group policy editor all configure tell me early

0 Answers   Bhel, HCL, Wipro,


Two men, Barry and David, and two women Ann and Cathy are doctors. One is a surgeon, one a dentist, one an optometrist, and one is a general practitioner. They are seated around a square table, with one person on each side. 1) Barry is across from the dentist. 2) David is not across from the surgeon. 3) The optometrist is on Ann's immediate left. 4) Cathy is the general practitioner. 5) The surgeon and general practitioner are married to each other. 6) The general practitioner is not on Cathy's immediate left. 7) The general practitioner is across from the optometrist. Which of the following must be true? a) Barry is the dentist. b) The surgeon and general practitioner are women. c) The dentist is across from the surgeon. d) David is the surgeon. e) Cathy is across from Ann. 13) Two men, Barry and David, and two women Ann and Cathy are doctors. One is a surgeon, one a dentist, one an optometrist, and one is a general practitioner. They are seated around a square table, with one person on each side. 1) Barry is across from the dentist. 2) David is not across from the surgeon. 3) The optometrist is on Ann's immediate left. 4) Cathy is the general practitioner. 5) The surgeon and general practitioner are married to each other. 6) The general practitioner is not on Cathy's immediate left. 7) The general practitioner is across from the optometrist. If both women leave the table, the a) optometrist and dentist remain. b) surgeon and optometrist remain. c) surgeon and general practitioner remain. d) general practitioner and dentist remain. e) general practitioner and optometrist remain.

3 Answers   ABB, Infosys,


can any one know about NIC (National Informatics Centre) questions Patterns and full detail about written exam, and interview send to softshikha2005@yahoo.com.in Thank you

0 Answers  


How did your supervisor on your most recent job evaluate your job performance ?

0 Answers  


ssc exam comission

0 Answers  


Attempt a brief explanation about the scope of English language education at school and college levels.

0 Answers   Mahatma Gandhi University,


Categories