0% found this document useful (0 votes)
77 views

C Language

Computer programming involves writing source code according to the rules of a programming language in order to create programs that exhibit desired behaviors. C is a general purpose programming language developed in 1972 that is widely used to create system software, application software, device drivers, and embedded software. A compiler is a computer program that transforms source code written in one programming language into another target language, often producing executable object code.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
77 views

C Language

Computer programming involves writing source code according to the rules of a programming language in order to create programs that exhibit desired behaviors. C is a general purpose programming language developed in 1972 that is widely used to create system software, application software, device drivers, and embedded software. A compiler is a computer program that transforms source code written in one programming language into another target language, often producing executable object code.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 15

Introduction to Programming Computer Programming 1

(often shortened to programming or coding) is the process of designing, writing, testing, debugging / troubleshooting, and maintaining the source code of computer programs.
This source code is written in a programming language. The purpose of programming is to create a program that exhibits a certain desired behavior. The process of writing source code often requires expertise in many different subjects, including knowledge of the application domain, specialized algorithms and formal logic.

is an artificial language designed to express computations that can be performed by a machine, particularly a computer.
Programming languages can be used to create programs that control the behavior of a machine, to express algorithms precisely, or as a mode of human communication.

C is a general-purpose computer programming language developed in 1972 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system.

is a computer program (or set of programs) that transforms source code written in a programming language (the source language) into another computer language (the target language, often having a binary form known as object code).
The most common reason for wanting to transform source code is to create an executable program. The name "compiler" is primarily used for programs that translate source code from a high-level programming language to a lower level language.

C Language is widely used in creating the following:


System software Application software

Device drivers
Embedded software High performance servers and client application Video games

The #include directive tells the preprocessor to treat the contents of a specified file as if those contents had appeared in the source program at the point where the directive appears.
You can organize constant and macro definitions into include files and then use #include directives to add these definitions to any source file. Include files are also useful for incorporating declarations of external variables and complex data types.

which stands for "standard input/output header", is the header in the C standard library that contains macro definitions, constants, and declarations of functions and types used for various standard input and output operations.

means "console in/out" which means ways of getting data to and from the console device (which uses the keyboard and screen).

The conio.h library just contains functions that deal specifically with the console (keyboard and black popup screen).

you must ALWAYS include this in your program, otherwise the computer doesn't know where to start!
The parentheses ( ) after the name main having nothing inside them. This means that nothing is to be fed into the main function. Curly brackets group together a set of instructions in this case, we are grouping together all the instructions under the function name main.{ }

Opening Curly Brace { - Beginning of instructions for the main function

Closing Curly Brace } - End of instructions for the main function

it shows where the end of an instruction is by placing a semi-colon (;) character straight after each instruction.

This makes programming very much a step-by-step process, with each step being a command with a semi-colon on the end of it.

Print formatted data to stdout. Writes to the standard output (stdout) a sequence of data formatted as the format argument specifies.

This is use to clear the output screen i.e console

getch is used to hold the screen in simple language, if u don't write this the screen will just flash and go away.

You might also like