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...

How to receive strings with spaces in scanf()

Answer Posted / rushabh

scanf("[^\n]s",s);

Is This Answer Correct ?    5 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What functions are used for dynamic memory allocation in c language?

1211


PLS U SENS ME INTERVIEW O. MY EMAIL ADD, SOFIYA.SINGH@GMAIL.COM

2227


Tell me the use of bit field in c language?

1106


WRITE A CODE IN C TO SEARCH A FILE FROM NOTEPAD FILE.

2498


When we use void main and int main?

1127


What is the significance of an algorithm to C programming?

1094


Explain what is the heap?

1102


Explain how to reverse singly link list.

1202


What should malloc() do? Return a null pointer or a pointer to 0 bytes?

1137


How is a pointer variable declared?

1158


Explain which of the following operators is incorrect and why? ( >=, <=, <>, ==)

1087


Given only putchar (no sprintf, itoa, etc.) write a routine putlong that prints out an unsigned long in decimal. [ I gave the obvious solution of taking % 10 and / 10, which gives us the decimal value in reverse order. This requires an array since we need to print it out in the correct order. The interviewer wasn't too pleased and asked me to give a solution which didn't need the array ].

1138


Explain what is the concatenation operator?

1230


List the difference between a While & Do While loops?

1151


What are Macros? What are its advantages and disadvantages?

1218