11.20.07

A Basic C Script

Posted in C AND C++ Scripts at 2:12 am by admin

‘C’ is perhaps the biggest institution as far as programming languages go. While most of the languages from that period of the world are still in use today, so many different languages were influenced in later eras by the C programming language that it is almost impossible to be a programmer without seeing at least the influence of C in the work that you do on a daily basis. For this reason, C is one of the most revered programming languages around and it is still high on the list of most people to learn when they sit down and decide to become a programmer.

The main problem with C nowadays is that it has become such a mammoth part of the world that it is sometimes difficult to know where to begin. Many of the programmers out there have developed non-standard way of doing C programming and therefore a lot of the programs that you see from them are going to have things that you do not recognize and will have to look up. However, learning the basics of C are easy and learning how to print something on the screen for people to look at is something that is so easy that it is practically instantaneous.

Consider the following C script:

Main()
{
Puts(“Hello World!”);
Return(0);
}

This is perhaps the simplest C script that you are ever going to come across. The main() defines the function main, which is basically a function that uses within it two more functions. The puts function which displays the words Hello World on the screen and then the return function which basically ends the program. That’s all there is to it. Three functions and five lines produce the same Hello World example that you likely have seen from other examinations of basic scripting for different languages.

Another thing that you can see in this example is the influence that C has had over a number of different languages. A lot of the above code will look familiar to you if you are a person that has had some experience in programming with the PHP server scripting language. A lot of the functional elements such as brackets and semi-colons are used in the same way. While this might be second nature to us now, keep in mind that the inventors of C invented this way of doing things and in doing so paved the way for many of the languages we now use today.

Scriptycan is a great software repository featuring both free and commercial C and C++ Scripts and applications for developers and programmers.