C language introduction
C is the most popular computer programming language or compiler language developed by the Dennis richly in New Jersey between 1969 to 1973 at bell telephone laboratories actually c re-implement with the UNIX (operating system) but after UNIX OS also re-written in C.The language was formatted in 1988 by ANSI (American national standard institute).the aim of the c language is to provide an easy and natural way of giving programs of instruction to a computer
FEATURES:
Nowadays C widely using as Professional language to write program(s) so we have known what are the reasons thereEasy to WRITE
Easy to LEARN
STRUCTURE PROGRAM
EASY TO DEBUGGING & TESTING & MAINTENANCE
ITS ALLOWS VARIETY OF PROGRAMS
It can produce EFFICIENT PROGRAM
It is many time faster than BASIC
Include header file section
Global declaration section
main( )
{
Declaration part
Executable part
}
User-defined functions
}
Statements
}
It is also a predefined function which reads characters so that program execution will not complete until we press any key
Global declaration section
main( )
{
Declaration part
Executable part
}
User-defined functions
}
Statements
}
Include header file section
c program depends upon some header files for function definition that are used in the program. every header file consists .h. example: #include
use of header file:
It is declared interface of parts of operating system and also
It is also useful for copying source which you have to want
Global declaration
This section declares some variables that are used in more than one function. These variables are known ad global variables.This section must be declared outside of all the functions.
Function main
Every program contain main() function.The main() is stating of every c program.
Note: without main() we cannot execute the c program
Declaration Part
The declaration part declares the entire variables that are used in execution part
User-defined
#Includen
includes any file code to our program so program studio.h code will be added
Clrscr ()
It is predefined function which is clear previous output an consolePrintf
It is predefined function to something on consolescarf
It is predefined function which takes I/p from keyboard & stores in RAMgetch()
It is also a predefined function which reads characters so that program execution will not complete until we press any key
IT IS HELPFUL FOR IN WRITING C PROGRAMS
<DIR > Directory Views.
<CD >Displays/changes the current directory.
<CLS >Clear screen.
<COPY >Copy files.
<DEL >Removes one or more files.
<EXIT > Exit from the shell.
<MD >Make Directory.
<RD >Remove Directory.
<REN >Renames one or more files.
<TYPE >Display the contents of a text DOS version.
<VER >View and set the reported DOS version
THIS KEYS ARE USEFUL FOR ADJUSTING
ALT-ENTER : Go full screen and back.
ALT-PAUSE : Pasuse DOSBox.
CTRL-F1 : Start the key maker
CTRL_F4 : Upadate directory cache for all drives!swap mount disk-image.
CTRL-ALT-F5 : Start/Stop creating a movie of the screen.
CTRL-F5 : Save a screenshot.
CTRL-F6 : Start/Stop recording sound output to a wave file.
CTRL -ALT-F7 : Start/Stop recording of OPL commands.
CTRL-ALT-F8 : Start/Stop recording of raw MIDi commands.
CTRL -F7 : Decrease frameskip.
CTRL -F8 : Increase frameskip.
CTRL -F9 : Kill DOSBox.
CTRL-F10 : Capture/Release the mouse.
CTRL-F11 : Slow down emulation (Decrease DOSBox Cycles).
CTRL-F12 : Speed up emulation (increase DOSBox Cycles).
ALT-F12 : Unlock speed (turbo button/fast forward).
HOW TO OPEN C THROUGH COMMAND PROMPT
<\center> To write C language we need compiler to run our program.
Comments
Post a Comment