What is the difference between GETS();AND SCANF();

Answer Posted / rejith vr

We can use scanf() instead of gets()

Syntax : gets(str);
||
||
scanf("%[^
]s",str);

it will accept multiple words in a string

Is This Answer Correct ?    5 Yes 23 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Are bit fields portable?

681


What is meant by gets in c?

612


Iam a B.Tech graduate and completed my engineering in 2009, from 2005 to 2009 and after that i had done nothing.Now i want to do job and get into BPO field . Friends give me suggestions as what to say in interview... if they ask me that what would you had done ... these many years without doing job ??????? pls urgent

1432


What is indirection? How many levels of pointers can you have?

664


How can I invoke another program or command and trap its output?

621






What kind of structure is a house?

562


What is New modifiers?

674


Why do we use c for the speed of light?

610


How many identifiers are there in c?

587


If you know then define #pragma?

678


How to establish connection with oracle database software from c language?

1679


How can I generate floating-point random numbers?

613


What is header file definition?

575


Why is c faster?

596


What are structure members?

601