AsegGasiaBlog

C Programming language - Description

Description 

    There are an a ful lot of programming languages available right now everything from the extremely high level to the low level power of assembly, and a good variety of specialized options in between . Java has also become quite the hot programming language for some tasks, in part because of its large API and in part because the virtual machine provides some elements of security. (Garbage collection is another nice feature and can make programmers much more efficient).  

    Nevertheless, there are some good reasons to learn to program in C. First, C has been around for 30 years, and there is a ton of source code available. This means there's a lot to learn from, and a lot to use. Moreover, many of the issues with the language have been clearly elucidated it's well understood, and we can find a lot of tutorials available. Plus, with C, we get lots of strong opinions mixed with insights that we can understand.  

    As a result of its use as the language of system programming for Unix, C has become something of the lingua franca of programming. C is a great language for expressing common ideas in programming in a way that most people are comfortable with. Moreover, a lot of the principles used in C for instance, argc and argv for command line parameters, as well as loop constructs and variable types will show up in a lot of other languages you learn so you'll be able to talk to people even if they don't know C in a way that's common to both of you.

    C is reasonably close to the machine. When we're working with pointers, bytes, and individual bits, things like optimization techniques start to make a lot more sense. There's also utility in knowing exactly how something works underneath the hood -- this helps a great deal when something you're trying to do in a higher level language seems way slower than expected, or just doesn't work at all. You also tend to get a better picture of advanced topics like exactly how networking works. A higher level language will make it a little bit simpler, but it'll be harder to understand what's going on, and when things stop working, it's much better to know exactly what's going on so you can fix it. Additionally, if you like computer science as a discipline, or just like knowing how things work learning the details of the system is great fun.

    C is the language that is used to write other languages. It allows you to get as intimate with the CPU and other hardware as you like. If you don't know C, you don't know how other languages achieve the results they do.

    Abstraction is an important concept, of course, and not everyone needs to know how their framework of choice is achieving the results it promises. You don't need to spend 20 years writing C, or indeed thinking about what happens to your vtables when you use multiple inheritance, in order to write good code.

    Now, you can drive a car without understanding how a 4-stroke engine works or indeed without being able to use a stick shift (manual gear box). However, if you understand what is going on under the hood you will, from time to time, be able to achieve exceptional results that someone without that knowledge will struggle to replicate. 

    The advantage to knowing C is that you have a very good idea of how a computer works. Not just how your programming model works, but how memory's laid out, and suchlike.

    The only level below C is the assembly spoken by a particular CPU.(I'd add that knowing C also lets you appreciate how much less work you have to do in a higher level language. And hopefully an appreciation of the cost involved in working in that higher level language.)

    C is a procedural programming language. It was initially developed by Dennis Ritchie between 1969 and 1973. It was mainly developed as a system programming language to write operating system. The main features of C language include low-level access to memory, simple set of keywords, and clean style, these features make C language suitable for system programming like operating system or compiler development.

    Learning C programming has lot of benefits, but the foremost thing in which it helps is to understand the underlying architecture of how things works?

    Consider a situation where a person learns to drive a Car. In this modern era with advancement in technology, we have many options when it comes to buying car. There are cars with auto-driving mode, auto gear change features etc which reduces the manual overheads and makes driving the car easier. Suppose the person learns driving on a auto-gear change enabled car. After learning driving, the person applied for a driving licence for which he need to pass a driving test. The driving test is now on a manual car with no auto-gear change feature. The person was even not able to answer some basic questions related to gears as he was not even aware of it and eventually ended up getting disqualified.

    Learning C has a similar benefit. If the person had learned driving on a manual car, he could have easily driven the automatic car as well. Similarly, if a person learns C programming first, it will help him to learn any modern programming language as well. As learning C help to understand a lot of underlying architecture of operating system. Like, pointers, working with memory locations etc.

    In fact, a lot of fun programming is done in C for instance, system software and data managers such as Berkeley DB. If you want to be able to do more than write a simple web app, C is a great language. If you want to write a great, fast game, C is again a great choice. You can write an entire OS in C. It'll be much harder to do so in Java, and nearly impossible in a scripting language. And the language, being succinct as C is, will probably make your fun program more elegant looking to boot. 

    You need to know enough C to read code written in C, because of the vast amount of very important code written in the language. That's about all you will retain from going well through a thorough manual on the subject (I used Kochan's "programming in C") without actually having to code in the language, anyway. Should you ever wind up in a situation requiring you to use the language extensively, you will have a good base to build on. You probably want to study something like Duntemanns Assembly book if the machine is an abstacted black box to you. I also recommend Petzold's "Code".

    Outside of that--basic literacy in C and basic familiarity with the underlying machine--you'd be best served spending your study time on the real stuff, like SICP, TCP/IP Illustrated or books on Concrete Mathematics, algorithms or data structure. The real stuff.

    Spending a lot of time studying C while coding in PHP simply isn't worth the opportunity cost. There's more helpful things to learn. C really is just another language that you can learn well only though study and use, but can pick up when you need to.

C has many advantages is a low level language.You can use c to develop kernel and driver. C is a fastest language.Many power software be developed by c. For example: memcached,redis,nginx,apache,mysql etc. C is a cross-platform language. The program developed by c can run at every platform. Other cross-platform languages can not do this. Java,python,php etc can not run at iOS platform. C++ can not run at many embedded systems.

    A practical rule of thumb is that you need to understand at least one level of abstraction below the one you usually work in. Consider that your PHP or JavaScript interpreter may actually be implemented in C or C++. Eventually you are going to hit a bug in the interpreter or even a C runtime error. If you don't understand C you are going to be limited to sending a bug report to the maintainer, hoping they can reproduce it and care about it, and then twiddling your thumbs. If you know C you can tell them exactly where the problem is and what it is.

    This also means that if you work in C/C++ you should at least be able to read assembly on your platform. As for learning C when you need it: my observation is that most programmers can learn Perl/Python/Javascript on demand, but assembler/C/Lisp seem to require a lot more time, so it's worth learning at least some basics before the need arises.

    If you don't know C, then to some extent you don't really know what you're doing as a programmer. So, I think I'm the sort of "biased" person you're talking about here.

    However, in practice, whether or not you really know what you're doing as a programmer doesn't necessarily prevent you from developing really awesome, useful software using high-level tools. I mean, the creator of Stack Overflow, Jeff Atwood, apparently doesn't even know C, and yet I would say Stack Overflow is a pretty damn good web application.

    Whether or not you decide to learn C (or C++, or assembly) depends on what type of programmer you want to be. If you just want to develop cool web apps or business apps, that's fine - no real need to learn C. But if you want to really excel at what you do - if you want to work on really cool projects that push the state of the art, then you really need to take yourself seriously enough as a programmer to really understand how computers work. Since C is essentially the OS lingua franca, as well as the language that powers just about everything else (from the Linux kernel to most Java VMs, to the Python and Ruby interpreters, SQL databases, web servers, and just about every device driver), an intimate understanding of the language goes a long way.

    Not to mention that knowing C (or C++) opens up a huge opportunity for contributing to large open-source projects that impact millions (or hundreds of millions) of people. Want to work on improving the Python interpreter, or the Chromium web browser? Well, you need to know C for the first and C++ for the latter.

    That's why comparing C to dead natural languages like Latin or outdated technologies like the horse and carriage is completely wrong. A large portion of our 21st century software infrastructure is powered by C code, which is why C remains as relevant today as ever.

    So, whether or not you should learn C really depends on what you want out of your career as a programmer.
C is a powerful systems programming language. Learn C with our popular C tutorial, which will take you from the very basics of C all the way through sophisticated topics like binary trees and data structures.


Sweat the hard stuff.

  • Core skills needed to write a C program.
  • Build your own basic calculator.
  • How to smartly handle repetitive tasks using Programming.
  • Who is the target audience?
  • This is suitable for an absolute beginner who wants to learn programming from scratch.
  • If you want to lay a SOLID foundation for your long and fruitful programming career, C programming is the best choice to start with.
  • Helps to understand the fundamentals of Computer Theories. Most of the theories related to computers like Computer Networks, Compiler Designing, Computer Architecture, Operating Systems are based on C programming language and requires a good knowledge of C programming if you are working on them. In the modern high level languages, the machine level details are hidden from the user, so in order to work with CPU cache, memory, network adapters, learning C programming is a must. 
  • C is a Middle-Level Language. The middle-level languages are somewhere between the Low-level machine understandable assembly languages and High-Level user friendly languages. Being a middle-level language, C reduces the gap between the low-level and high-level languages. It can be used for writing operating systems as well as doing application level programming. 
  • C is very fast in terms of execution time. Programs written and compiled in C executes much faster than compared to any other programming language. C programming language is very fast in terms of execution as it does not have any additional processing overheads such as garbage collection or preventing memory leaks etc. The programmer must take care of these things on his own.
  • Fewer Libraries. C programming language has fewer libraries in comparison with other high-level languages. So, learning C programming also clears programming concepts to a great extent as you have to write lot of things from scratch. You will not be dependent on the programming language entirely for implementing some basic operations and implementing them on your own will also help you to build your analytical skills. 
  • Embedded Programming. C is extensively used in Embedded Programming. Embedded Programming is also referred to as micro-controller programming, where C program is used to control micro-controllers. Microcontrollers and embedded programming is widely used in auto-motives, Robotics, Hardwares etc.
  • C is often considered to be the mother of all languages because so many other languages have been based on it
  • It also supports functions of high-level programming languages, such as scripting for software applications etc
  • Learning C can actually make you a better programming in other languages like C++, Java, or C# by equipping you with a mental model of what the computer is actually doing when you run your programs.
  • C is highly portable and is used for scripting system applications which form a major part of Windows, UNIX, and Linux operating system. 

Popular Posts