473,396 Members | 2,115 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How do i alter the string so that it can contain spaces?

#include <stdio.h>

main ()
{
char string[100];

printf("Enter a sentence: ");
scanf("%s", string);

printf("You entered \"%s\".\n", string);
}
Dec 7 '10 #1
1 1636
donbock
2,426 Expert 2GB
Look here.
Dec 8 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Marlon | last post by:
<! -- Web.config--> <authentication mode="Windows" /> <identity impersonate="true" /> <! -- Web.config--> where Configurations.ADsUsersPath is...
15
by: zealotcat | last post by:
Hi, all: I want to implement a function (using std::string and std::vector) split a string contain special token into vector. eg: string = "alex delia john" ==> vector = "alex"; vector =...
3
by: Ivan Demkovitch | last post by:
Hi! I would like to check if string contain specific substring. How to do it? P.S. I've done something stupid like String.Replace
0
by: Just Me | last post by:
What's wrong with the following code? The TempName read is valid since I just wrote it and also did a QuickWatch to check it. But once I set the PrinterName the count of papersizes goes to zero. ...
4
by: -D- | last post by:
I'm new to .net and just learning c#. I have the following code in vb and want to convert this to c# Public Class PositionData Private strText As String Private strUrl As String Public...
10
by: slippingslider | last post by:
I tried using string and had problems, and now Im trying char* and I cannot still initialize "ABC Industries" as a default constructor. It appears that spaces between words make char variable...
2
by: Ken | last post by:
Is there a way if a string contain upper cas letter? Is there a way if a string contain Numbers? Is there a way if a string contain (Puntuation/Symbols) such as ~,!,#,$....? Thanks
1
by: mathieu | last post by:
Hi C++ gurus, Why in the following code the std::string destructor is being called before the 'catch' ? Thanks, -Mathieu #include <iostream> #include <sstream>
6
by: CSharper | last post by:
I have following code, if you cut and paste it in VS and compile it you see only an answer of 0. I was expecting values from o through 2999 using System; using System.Collections.Generic;...
3
by: vrsathyan | last post by:
Hi.., While executing the following code in purifier.., std::vector<int> vecX; vecX.clear(); int iCount = 0; { int iVal;
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.