String Array Problems ~~ Help ~~~~

Source: Internet
Author: User
String Array Problems ~~ Help ~~~~ -- Linux general technology-Linux programming and kernel information. The following is a detailed description. I wrote such a function.
Int inputline (void)
{
Char input_line [5] [9];
Int I;
Printf ("now input numbers! \ N ");
For (I = 0; I <4; I ++)
{
Scanf ("% s", input_line );
}
For (I = 0; I <4; I ++)
{
Printf ("% s", input_line);
}
Return 0;
}
There are no errors during the main function call process, but this problem is now found. If I enter a string first,
Then, do not enter a space at the position of the 2nd strings, and then enter other strings. According to what I mean, the output is
In this case, string 1 string 3 string 4 string 5.
But now it does not output this way. It moves all the strings starting with 3rd strings to a position
This is the case: String 1 string 3 string 4 string 5. My problem now is that I want to output it as I mean.
Thank you for your assistance. Thank you ~~~~!!!
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.