If you're not for some reason stuck on an iPad, it really isn't a snarky answer to just say don't. It might be marginally better than a phone, which is itself somewhat better than trying to learn programming on a game console, but you are way down on the bottom of the list of best tools, and unless you really have no access to any "real computer" and can't possibly afford to acquire even a $100 used laptop or scrounge up a random computer from somebody, which will blow away the iPad on the programming front no matter what OS you put or leave on it, you're really swimming uphill putting barriers in front of yourself in a context that really benefits from a reduction of as many barriers as possible. Programming's hard enough as it is without trying to fight the hardware.
2. repl.it supports C and C++ through a browser. They have a free plan.
3. Set up a small VPS at DigitalOcean, AWS, Google Cloud, etc. and ssh into that. You get the most control that way. A VPS costing less than $10/mo will work.
I work exclusively on an iPad as a full-time programmer and system admin, but mostly I do that over ssh to remote servers owned by my customers.
If you don't have access to any computer running windows, linux, or macos then I recommend buying an old Dell or Lenovo laptop on ebay for <$100 and putting a lightweight linux on it.
It doesn't take much computing power to run a c compiler and a text editor, you can probably find something suitable for less than $50 on your local Craigslist.
Get a laptop, put Linux on it. (Or use a Mac, I don't care.) In terms of ergonomics and available tooling, it's much better suited to C development than an iPad is. Most of the iPad solutions will involve shelling out to another computer anyway.
https://github.com/features/codespaces
I have used it for learning C, Rust and Go. It even has a VSCode editor in the browser. It’s pretty easy to setup. Create a repo, add a hello_world.c, push the code, then in the UI press the green Code button on the repo homepage, select “Create Code Space on main” and then use gcc from the terminal to compile the code.
(Codespaces can also run vscode directly in safari, but I find I run into fewer weird UI issues in Blink)
Personally, the lightness/portability of this setup has made it worth dealing with occasional issue related to coding on the iPad. Biggest issue I’ve run into is using Codespaces with really bad internet is pretty much a no go — can’t code on airplanes.
Like "The Best Camera is the One You Have With You", iPad could be the industry defacto dev environment, when away from a laptop/desktop. It could rival iPhone in ubiquity, because there's little competition in tablets. Pixel Tablet is a distant runner up in specs, but offers OS/app flexibility.
iPad Pro M4 already runs VMs (Secure eXclave), but Apple leadership refuses to give customers access to an iOS CLI shell running in an isolated VM. Until Apple stops ignoring the requests of their multi-device customers, it's best to invest in other platforms, using the iPad as a dumb client.
* Use a 3rd party service like ReplIt (https://replit.com) or Code Anywhere (https://codeanywhere.com/pricing). These are fine, and have native iOS apps used to connect to their services as well.
* Pay for a cloud instance and use an SSH tool to connect to it.
The downside to these two options (depending on your needs) is that you are pretty much just targeting Linux and building CLI apps. But that may be totally fine for you.
Personally, I pay $60/year for SplashTop (https://www.splashtop.com), setup a SplashTop server on my home computer, and then use the iOS client to connect to the my home computer and continue programming. And I get the benefit of being able to do other things as well (like playing Steam games) if I want.
Edit: similar to SplashTop, you could also - if interested in Windows - pay for a Shadow PC (https://shadow.tech) and connect to that.
As far as apps, I am not too sure what’s available, I know you can do swift playgrounds and that might have a C binding. (I checked there doesn’t seem to be a straightforward way to do C in swift playgrounds. Bonus content: https://github.com/uraimo/Awesome-Swift-Playgrounds )
What I do for most of my coding on iPad is use Google Colab. https://colab.research.google.com/
It’s a Jupyter Notebook, but you can get most things including working with C. The below link confirms C can be bound to and how.
https://blog.jupyter.org/interactive-workflows-for-c-with-ju...
As a matter of point, iPads aren’t really set up tool wise for programming. You can force something into this niche, but you probably want a computer for coding, because a significant portion of programming is massaging the system into doing what you need.
[1] https://github.com/ish-app/ish [2] https://www.reddit.com/r/ish/comments/r9irjs/ish_with_cc/
If you are Ok with a Terminal only workflow and you only care about C programming as in learning just the language, you should be able to do it.
Install iSH from the App Store. With iSH installed you can use the apk package manager to install VIM and GCC. You should be able for example to follow a basic book intro to C. iSH, while based on 32 bits Alpine Linux, it is not a complete operating system, so if you care about low level Linux programming you will be better off with a second hand laptop with Debian or Ubuntu on it.
Even a Chromebook with Linux enabled will run circles around your iPad from a programming point of view.
Pyto is an IDE for iPhone and iPad with a Python 3.10 Interpreter and all of the standard libraries plus more than 100 third party packages, as well as a C & C++ compiler and bitcode interpreter. Includes a terminal with standard UNIX commands, a code editor with code completion, support for Shortcuts, Picture in Picture, a graphical interface builder and a debugger.
Both Pythonista and Pyro allow learning Python, though Pythonista runs behind on Python versions, and doesn't claim to have C and C++ compilers that can make CLI tools.
If online is fine, you could obtain a free cloud VM/VOS [2], ssh into it and use the usual Unix C development tools there.
[0] https://apps.apple.com/us/app/idos-3/id1580768213
[1] https://winworldpc.com/product/turbo-c/3x
[2] https://github.com/cloudcommunity/Cloud-Free-Tier-Comparison
https://news.ycombinator.com/item?id=41415077
Unfortunately I don't think this is available (yet) as an app or patches to actually run on an ipad?
It's a shame, I think a modern game engine with ide and a modern tablet could be pretty close to a pragmatic dynabook and smalltalk combination.
Speaking of Smalltalk, there's:
Ed: and:
If you want to work offline, I've heard of folks carrying around a small "sidecar" computer the iPad connects to via USB or bluetooth. Rui Carmo has a [description of his setup here](https://taoofmac.com/space/blog/2023/09/09/1820).
2. On jailbroken iPads, UTM[2] VM running x86 linux should run great
3. iSH[3], it was quite sloppy for me, YMMV.
[1]: https://termius.com/
[2]: https://getutm.app/
[0]: https://sdf.org/
For example, GitHub Codespaces is just a web site and gives you access to a virtual machine with Visual Studio Code. It’s nearly the desktop experience but ought to work fine on an iPad… if you’re well connected with WiFi or 5G!
as a kid, it was easier to buy a used Xbox with cash (as-is and heavily worn) and pick up a couple Linux administration books from the bargain bin (with script examples that still worked!), than find a hosting provider that was willing to take me on as a customer without an ID or permanent residence
is it possible to learn programming from scratch in 2024 without a credit card?