Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I would like to study C using iPad. Just simple programs. So, is there a C compiler for iPad?

share|improve this question
add comment

7 Answers

up vote 9 down vote accepted

A cursory look at the iTunes Store reveals CodeToGo (iTunes Store Link). Since you cannot compile on the iPad itself, this app leverages a web service (IDEOne) in order to run the program and return the results to your device. The app is USD$3 and a universal binary (iPhone+iPad). The web service appears to be free, if not just a little ugly :).

share|improve this answer
add comment

If you're willing to jailbreak, the answer is yes. You can install GCC (the same open-source C compiler included with XCode) on your iPad.

The process is a bit complicated, but it's certainly possible. You can find instructions here. The instructions I've linked only mention the iPhone, but the same process should work on the iPad.

If you're not willing to jailbreak, then the solution VxJasonxV suggested might be your only option.

share|improve this answer
    
I would caution anyone on doing this - past iOS 2, this can cause your iDevice to not boot properly, for god knows what reason. –  Richard J. Ross III Sep 28 '12 at 13:54
    
It should also be noted that Xcode no longer uses GCC, but it now uses Clang, a custom codebase that was designed as a replacement for GCC (but only for C-based languages). –  Richard J. Ross III Sep 28 '12 at 13:54
add comment

If you have an internet connection, you could use codepad.org. They let you compile many different languages from code you paste into a web form. Supports a lot of formats and has some nice sharing features.

share|improve this answer
    
A couple other options include compilr.com and ideone.com. –  Zenox Apr 2 '13 at 18:10
add comment

Apple does not allow running any executable (machine) code other than that approved by the App store review process to run on an iPad.

It might be possible to port a C interpreter to the iPad, as long as it was disabled from downloading C code.

share|improve this answer
add comment

The are no C compiler App Store apps for any iOS device due to a clause in the iOS Developer Program License Agreement which basically says that:

"Apple's iOS SDK prevents any software on the iPhone from downloading or running external executable code"

That is taken wikipedia. I believe I can't link to the agreement for some reason or another.

If you just want an editor you might look at Project Edit.

share|improve this answer
2  
That quote is actually out of date. The terms were changed in the last few months to allow interpreted (not compiled) code to run, so long as it doesn't download any. But of course, [citation needed] and I haven't found it yet. –  Jason Salaz Mar 4 '11 at 3:48
add comment

I have stumbled upon this C/C++ compiler; not sure what it's worth though but it does look like a simple-ish C/C++ compiler for iPhone/iPad.

My guess is that it does not actually compile to iOS binary code, but to some sort of bytecode that the program then interprets. That's the only way it could get by Apple QA.

share|improve this answer
add comment

Here are the C compiler options available via Cydia, along with some non-standard repositories that provide additional tools and packages that are interesting for anyone trying to make an iPad as functional as a computer...

enter image description here enter image description here

enter image description here

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.