The screen on which our output appears in C is 8 tab spaces wide. Is there any hack to increase the width of C ‘s print screen ? In case it is necessary, I am working in windows on codeblocks IDE .
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The C programming language and libraries don’t have a print screen per se. They send output to streams. In the case of the
printffunction, for example, there is a default output stream called stdout, which echoes to your terminal, so the following two calls are equivalent:A line of output to a stream is delimited by a newline character (
\n). (But since you’re on windows, you may need to end your lines with\r\n, especially if you redirect your output to a text file sometimes. See here.)So I think your question is really about how to control the number of characters your terminal will print before automatically wrapping to the next line (or truncating). (And maybe how your terminal will deal with tabs?) This will depend on what hardware, os, and shell you are running, but Termcap is probably where you want to start if you’re using a unix style shell. If you’re using a windows
CMD.EXEwindow, there are some settings you can access through the “Layout” tab of the “Properties menu”, which is accessible via the window menu icon in the upper left hand corner of the menu bar; this will let you set your screen buffer width and thus control whether long lines will wrap or result in a horizontal scroll bar.