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 / suman halder

#include<stdio.h>
int main()
{
char str[100];
scanf("%[^\n]s",str);

}

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a header file?

1136


What is wild pointer in c?

1124


if a is an integer variable, a=5/2; will return a value a) 2.5 b) 3 c) 2 d) 0

2012


Explain what happens if you free a pointer twice?

1134


Wt are the Buses in C Language

3262


Write a Program to find whether the given number or string is palindrome.

1337


How can I make it pause before closing the program output window?

1080


What is the difference between local variable and global variable in c?

1289


can we implement multi-threads in c.

1177


What is adt in c programming?

1225


How will you print TATA alone from TATA POWER using string copy and concate commands in C?

1421


What is array within structure?

1171


What is the sizeof () a pointer?

1047


What is static memory allocation?

1240


List some basic data types in c?

1082