Presentation is loading. Please wait.

Presentation is loading. Please wait.

Prof: Dr. Shu-Ching Chen TA: Samira Pouyanfar Spring 2015 C Tutorial CIS5027.

Similar presentations


Presentation on theme: "Prof: Dr. Shu-Ching Chen TA: Samira Pouyanfar Spring 2015 C Tutorial CIS5027."— Presentation transcript:

1 Prof: Dr. Shu-Ching Chen TA: Samira Pouyanfar Spring 2015 C Tutorial CIS5027

2 What is C? C is a structured, procedural programming language C has been widely used both for operating systems and applications It has become one of the most widely used programming languages of all time Many later languages have borrowed directly or indirectly from C,including C++C++, Java, JavaScript, C#, Perl, PHP, Python, …JavaJavaScriptC#PerlPHPPython

3 Main function in C Every full C program begins inside a function called "main“ A function is simply a collection of commands that do "something" The main function is always called when the program first executes From main, we can call other functions,

4 Simple Example To access the standard functions that comes with your compiler, you need to include a header with the #include directive

5 Variables in C There are several different types of variables: char int float

6 Arrays in C syntax for declaring an array: For example:

7 If statements in C

8 Loops in C Loops are used to repeat a block of code  for  while  do … while

9 Functions in C functions are blocks of code that perform a number of pre-defined commands to accomplish something productive

10 Function example in C

11 C and C++Tutorial http://www.cprogramming.com/tutorial/c-tutorial.html http://www.cprogramming.com/tutorial/c++-tutorial.html


Download ppt "Prof: Dr. Shu-Ching Chen TA: Samira Pouyanfar Spring 2015 C Tutorial CIS5027."

Similar presentations


Ads by Google