Forgive me I am being dumb here. Why would one want to create a website in C programming language? Are there any advantages/disadvantages in using C for web apps?
Just as @mevrael already wrote, writing a website in C should only be considered after optimizing everything else and still needing more performance (Facebook, Google,....). There might be one more aspect: Crunching numbers. When doing heavy calculations on your backend, I highly recommend using a system language and outsourcing computations to GPUs via OpenCL or CUDA.
Personally, however, I would not go for C or even C++ any more. We are at the end of 2016 with new tech and languages which get you the C-speed, but with a lot more convenience on the developer-side. Personally, I would use Rust, as it prevents many error classes during compile-time. If there are no logical errors and you optimized your algorithms, you will have a rock-solid, high-performance application.
By the way, I don't believe that C will be used for WASM. I think, most WASM modules will be C++ or Java or Python or C#. In WASM, they will all have the very same performance, when given the same algorithm, so why should anyone go down the painful path of writing C?
you can :) in one of our local hacker communities (metalab.at) there is one guy who has written his webserver + homepage in C.
One of the major disadvantages that come to mind are missing shared data-structures.
And you actually would need to know what you're doing which reduces the likeliness once more.
Lets just say modern languages are much more comfortable to write such things.
As a "final" reason I would say to lowlevel for apps. if you're writing an App you actually don't want to write the engine, framework, server yourself unless you enjoy doing such a thing.
biplab malakar
Mev-Rael
Executive Product Leader & Mentor for High-End Influencers and Brands @ mevrael.com
C is used when extra high performance required for some heavy loaded modules which requires calculations. Many big companies, including, Facebook, later rewritten some parts on C.
For the most companies around the world there is no need in such performance and complexity at the beginning.
Web is very flexible, requires usage of many 3rd party APIs and JSON and dynamic languages are better suitable for that job, while in C you need to write and think about very small details and later controlling all that codebase is what you will fight. C requires also much more knowledge then PHP or JavaScript, thus much harder and more expensive will be to hire an engineer. One of the core functions in the modern web - dealing with JSON, which in C is a real pain.
Answering your question from the point of view you are asking it - No, nobody in his clear mind will not be writing web app in C at the beginning. It will be too long and too expensive, while with modern CPUs, GPUs and cheap VPNs, cloud there wouldn't be any real difference for business.
However, web evolves and WASM (WebAssembly) is coming. That means C will be used more in Web in the future, but, again - to bring some modules with highest performance to the market. WASM are like JavaScript modules written in a way similar to PHP extensions - you import compiled WASM into JS itself to use it functions. Most of the general code will still be written on JS/PHP/Java/whatever.