Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

explain what is an endless loop?

1058


How can I open files mentioned on the command line, and parse option flags?

1037


What is a stream in c programming?

1109


Explain how do you list files in a directory?

1040


Write a C program to accept a matrix of any size. Find the frequency count of each element in the matrix and positions in which they appear in the matrix

1968


Differentiate between #include<...> and #include '...'

1023


When should you use a type cast?

1082


Create a simple code fragment that will swap the values of two variables num1 and num2.

1245


If errno contains a nonzero number, is there an error?

1327


Why c is called a middle level language?

1074


How can I pad a string to a known length?

992


List some of the dynamic data structures in C?

1212


What is console in c language?

1067


Write the control statements in C language

1156


How do you write a program which produces its own source code as output?

1083