Ask your own question, for FREE!
Computer Science 10 Online
OpenStudy (comm.dan):

I have a question about creating a new line using the new line command in Xcode. The version of Xcode that I am using is 4.6.3. I am creating my current projects in OS X, under Application, the sub category Command Line Tool, and then I am doing it in the C programming language. I know that use use the printf command to execute the command. If is possible, I would like help on knowing how to do it. I will give a medal out to the person who can help me answer my question. Thanks if anyone can help, -Comm.Dan

OpenStudy (e.mccormick):

A new line with printf? \n

OpenStudy (comm.dan):

Yes

OpenStudy (nincompoop):

is that the X11 that looks like a terminal? they've removed that under OSX Mountain Lion but new command line but you generally just install a new command line tools.

OpenStudy (e.mccormick):

The escaped n is the newline in C\C++ ``` printf("\n"); ```

OpenStudy (comm.dan):

I have X11 on my Mac, but I don't use it Here is what I meant to say printf("/n'); or printf("\n");

OpenStudy (comm.dan):

K Thx I will see if ti works

OpenStudy (e.mccormick):

Here is a reference for you: http://www.cplusplus.com/reference/cstdio/printf/

OpenStudy (comm.dan):

It doesn't work. All it does is show /n in the debugging console.

OpenStudy (e.mccormick):

Not /n \n

OpenStudy (comm.dan):

I am writing my projects in C

OpenStudy (comm.dan):

The second one worked. Thanks for the help @e.mccormick, -Comm.Dan

OpenStudy (comm.dan):

@nincompoop What is X11 used for?

OpenStudy (nincompoop):

then you should've just asked how to add a new command line in C geez

OpenStudy (nincompoop):

there are two ways to create a command line: \n and std:endl

OpenStudy (comm.dan):

K Thx for the help @nincompoop -Comm.Dan

OpenStudy (nincompoop):

they are the same but with differing parameter requirement.

OpenStudy (comm.dan):

K

OpenStudy (e.mccormick):

He said with printf, not cout.

OpenStudy (nincompoop):

k then \n LOL

OpenStudy (comm.dan):

Do you program @nincompoop and @e.mccormick?

OpenStudy (nincompoop):

I did C, C# and C++ a while back.

OpenStudy (comm.dan):

What languages are your favorites?

OpenStudy (e.mccormick):

Professionally? No. Can I? Yes, some things. Know a bit of C++, Python, VBas, and HTML, used Perl and BASIC years ago, and am learning Java at the moment because it is required for my degree.

OpenStudy (comm.dan):

I am learning C and then am going on to Objective C.

OpenStudy (comm.dan):

I chose to learn C because I know that it is the basis for almost all of the modern programming languages.

OpenStudy (nincompoop):

yeh did those too. but I am not that proficient in Python, since it became popular when I've already stopped programming, and I am not a fan of Java for old time's sake.

OpenStudy (e.mccormick):

It seems that most programmers end up regularly using 3 to 5 languages and most know 5. Some of these may be closely related, like C and C++, or somewhat related like either of those and Java. Usually it comes down to 1 or 2 that they work in for production, a script language, and others they have found useful.

OpenStudy (comm.dan):

Ok. Thanks so much for the help again both of you @e.mccormick and @nincompoop. Have a great rest of your night, -Comm.Dan

OpenStudy (e.mccormick):

C to learn programming is not a great choice. C because you plan on doing OS development, drivers, etc. is a good choice. Why? Because C is not really that related to modern programming techniques. It is a bit distant from the features that newer languages have. It is still a wonderful language for being more directly tied to the machine code, but most coders do not want or need that.

OpenStudy (comm.dan):

Ok.

OpenStudy (e.mccormick):

The three long term use and starting languages most universities use are C++, Java, and Python. They all display more modern techniques than C. C++ is best if you know you will be using C later. Java is best if you plan on working towards Android development. Python is best if you want to learn a scripting language right off that happens to also be used for much more. And there are several other reasons for each one. I just list those singular reasons as examples.

OpenStudy (comm.dan):

Ok

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!