Getting started with C [1]

This time we will stop and see what C language can do. C (pronounced like the letter C) is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system.
Although C was designed for implementing system software,it is also widely used for developing portable application software.

C is one of the most widely used programming languages of all time and there are very few computer architectures for which a C compiler does not exist. C has greatly influenced many other popular programming languages, most notably C++, which began as an extension to C.

Today, I will try to explain you how C works, and what you need to know.

Fundamental Data Types

There are four basic arithmetic types:

  1. int
  2. float
  3. double
  4. char

But, if you want to be more specific, you can add one of the following keyword:

  1. signed
  2. unsigned
  3. short
  4. long

[TABLE=5]
You can determine the number of bytes used to represent a date, using the sizeof operator.
sizeof (data_type_name);
Examples:

sizeof (long int); // return  4
sizeof (unsigned char); // return 1
sizeof (long double); // rerutn 10

 

Constant Characters

– are represented by one or more characters enclosed in single quotes, eg ‘a’, ‘A’, ‘\ n’.
[TABLE=6]

Format specifiers

[TABLE=7]
Because is to much to write I’m not going to teach you step by step C, but in the following tutorials I will make some simple programs, and I’m sure that you will understand how C works. So, see you next time, when I will make some simple algorithms.

You can follow and like us:

Author: Horațiu Condrea

My name is Horațiu Condrea, and I work as a Software Developer Manager at Siemens PLM Software. I hope that my experiments will prove to be useful for many of you guys/girls out there. Don’t forget to leave a comment whenever you run over a bug or something that is not working as it should be. For any kind of information contact me.

One Reply to “Getting started with C [1]”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.