1 / 13

An Introduction to Programming

An Introduction to Programming. By :- Vishal Hirani B.Tech II year (CSE). What is Programming?. Wiki Definition : The action or process of writing computer programs. What is a Computer Program?. A sequence of instructions that a computer can interpret and execute. How Programming Works?.

hedwig
Télécharger la présentation

An Introduction to Programming

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. An Introduction to Programming By :- Vishal Hirani B.Tech II year (CSE)

  2. What is Programming? • Wiki Definition: The action or process of writing computer programs. What is a Computer Program? • A sequence of instructions that a computer can interpret and execute How Programming Works? • A Program tells a computer what to do. What is a Programming Language? • A programming language acts as a translator between you and the computer.

  3. How to Write a Program? • First : you need a computer • Second : you need a text editor. -Talking about Linux, you will be using Gedit. • Third : Save the file with extension .c example helloworld.c How to run the program? • Using a Compiler

  4. Compiler • A compiler is a special program that processes statements written in a particular programming language and turns them into machine language or "code" that a computer's processor uses. • For Linux this Compiler is GCC • And it is the compiler for most Unix based operating system and many languages`

  5. Algorithm and Flowchart • Algorithm: -Step by Step method to solve a problem. -Must include “ALL” required information. • Flowchart: -Graphical representation of Algorithm. -Includes Terminal + Process + Decision

  6. Average??

  7. Question: Find the largest of A,B & C Start Read A, B & C Is B>C Is A>B Is A>C Yes No Yes Yes No Print B Print C Print A No End

  8. Starting with Linux • Terminal (Ctrl+Alt+T) • Gedit: “gedit” • Program • Compiler • Output

  9. Hello World! /* Hello World program */ #include<stdio.h> int main() { printf("Hello World"); return 0; } Comment Header File Main function -Function starts Print function Returning output -Function ends Remember the .c extension

  10. Compiler: How to compile gcc filename

  11. Output: How to Run? ./filename.out

  12. Assignment

More Related