Contact Us

Getting Started With C programming language

The C programming language is a programming languages first created between 1969 and 1973 by Dennis Ritchie and has been the basis of many other programming languages since.

The first thing you need to get started with C is to find a compiler for your program. As C is a compiled language it needs to be turned into binary format before being run so the computer can understand and complete the commands.

There are a few available including Code:Blocks with MinGW for windows, gcc for Linux and XCode for Mac OS x.

Beginning with C

Every C program must be included inside a main function called “main”. This function is a collection of commands that perform specific requests and is called automatically when a program first executes.

Other functions can be included inside this function and there is actually a standard functions file that comes with your chosen compiler.

To include the standard C functions you will need to include this file using the “include” directive. This is done using #include plus the file name, which in C’s case is called stdio.h.

A very basic C program is shown below:

#include <stdio.h>

int main()

{

printf( “Hello World!n” );

getchar();

return 0;

}

Let’s break down our program then shall we. The #include command above tells our compiler to grab all the code from the stdio.h file and in effect paste it in place meaning we have access to everything contained inside it. In our example above this gives us access to the printf() and getchar() functions.

Our int main() function tells the compiler that there is a function called main and that the function will return an integer value which is why we place int before the function call. The curly braces that follow tells our compiler when our function will begin and end.

Our printf() function is the standard way of printing information to the screen and the getchar() function allows user to input a single character.

To end our little program we then return the value 0 which indicates that our program run successfully.

This is enough for today. If you would like any help with your web or development applications or projects then why not get in contact with us here at Network Intellect.

This article was posted by



Leave a Reply

What our clients say

"It’s like having your own in-house digital marketing consultancy rather than an external company. I no longer think about them as a supplier. They’re part of the team."
Marketing Manager, Education
"They have always been professional and focused on delivering results in a timely and cost effective manner. It is enlightening to have an organisation that takes the time to make recommendations on actual data analysis."
Business Manager, Charity
"They (Network Intellect) continue to exhibit their digital expertise by helping us to establish a competitive advantage by pushing the boundaries and innovating their technology and performance solutions."
Head of Marketing Communications, Education
"Because of their talent, expertise and level of service our on-line business has increased dramatically."
Founder, Electronics
"I would have no hesitation in recommending them as an analytics partner to understand and improve the performance of a website."
Vice President, Retail
Network Intellect continue to give us a fantastic service, fast and friendly and are always ready to go the extra mile. They have gone above and beyond the call of duty to deliver our results.
Director, E-Cigarette Web
"We found that Network Intellect had the depth of knowledge we needed and after speaking to them a few times we decided to go with them. It’s the best decision we’ve made in some time."
Owner, Retail
"Their services offered great value for money. I would not hesitate to recommend them as a digital partner to others."
Strategic Marketing Manager, Education
"Jason and his team at Network Intellect embody efficiency and efficacy. I would have no hesitation in recommending this excellent company to others."
Marketing Manager, Education
Network Intellect have managed our product data feeds with exceptional care and meticulous detail. I know I can trust them to make the right decisions for our business."
Director, E-Commerce
"It’s like having your own in-house digital marketing consultancy rather than an external company. I no longer think about them as a supplier. They’re part of the team."
Marketing Manager, Education
Read all testimonialsRead all testimonials

We can help you be great

We have friendly staff ready to help you get on your path to greatness...
Network Intellect Menu