Documents

Slide 03 - Introduction to C

Description
Slide 03 - Introduction to C
Categories
Published
of 18
37
Categories
Published
All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.
Share
Transcript
  Computer Science Department FTSM Introduction to C Knowledge: Understand the complete structure of C programs in Linux environment Skill: Edit, compile and execute C programs    TK1913-C Programming   2   Introduction  /* Task: This program calculates BMI */ #include <stdio.h> #define WEIGHT 60.0 #define HEIGHT 1.53 void main(void) { float bmi; bmi = WEIGHT / (HEIGHT * HEIGHT); if (bmi > 25.0) printf(“  \nYour BMI is %.2f. Need to lose weight! \ n”, bmi);  }     Resembles Algebraic Expression Augmented by certain English keywords   eg. if , else, while C is a High-level Language Can also be used at lower-level   This flexibility allows it to be used for SYSTEM PROGRAMMING (eg. Operating systems like UNIX and WINDOWS) APPLICATION PROGRAMMING (Billing System, Sistem Semut ? )   C has small instruction set, though the actual implementations include extensive library functions      “myfunction.h”   C encourages users to write additional library functions of their own   Finally, C programs are highly portable. They can be executed on different platforms without having to be recompiled (or with little modification)    TK1913-C Programming   3   C Development Environment There are 6 phases involved:    Edit   Preprocess   Compile   Link   Load   Execute    TK1913-C Programming   4   Editing C Program in Linux    Use vi  editor    $vi program_name.c   Use  pico  editor    $pico program_name.c   Use emacs  editor    $emacs program_name.c   Example:   $pico myprogram.c   This is only an example of program name. You can give any name that you like.
We Need Your Support
Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

Thanks to everyone for your continued support.

No, Thanks
SAVE OUR EARTH

We need your sign to support Project to invent "SMART AND CONTROLLABLE REFLECTIVE BALLOONS" to cover the Sun and Save Our Earth.

More details...

Sign Now!

We are very appreciated for your Prompt Action!

x