Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword
Like this
6Activity
0 of .
Results for:
No results containing your search query
P. 1
Complete Notes for c

Complete Notes for c

Ratings: (0)|Views: 382 |Likes:
Published by nirav4042

More info:

Published by: nirav4042 on Jan 31, 2010
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less

11/15/2011

pdf

text

original

 
In early 1970’s Dennis Ritchie at the AT&T’s Bell Laboratories USA developed‘C’. It was the best result of development process which started with older languages,‘BCPL’ (Basic Combined Programming Language) developed by Martin Richards and‘B’ developed by Ken Thompson. ‘BCPL’ and ‘B’ both turned out to be very specific.Ritchie inherited the features of ‘B’ and ‘BCPL’, added some of his and developed ‘C’.C stands in Middle Level Language. Since it was designed to have a good programming efficiency and machine efficiency.
STRUCTURE OF A ‘C’ PROGRAM. 
A Typical ‘C’ program can be divided into the following sections.DOCUMENTATION SECTIONLINK SECTIONDEFINATION SECTIONGLOBAL DECLARATION SECTIONmain() FUNCTION SECTION{DECLARATION PARTEXECUTION PART}SUB PROGRAM SECTIONFUNCTION 1FUNCTION 2...FUNCTION N1.Documentation Section – This section is used for comments. Comments beginwith/* and end with */. Comments are a must in every program. It helps in better understanding of the program. Comments can appear any where within the program also.2.Link Section – In C there are some special function libraries that are requiredwhile executing program because many function of the library can be used for various tasks. A function written by a programmer can also be placed in thelibrary. A header file is the one in which declaration of standard functions aremade.3.Definition Section – In this section of C program user defines the value of aconstant. This value can be used within the programs.
 
4.Global Declaration Section – In C variables can be defined globally. A variablewith a global scope is accessible everywhere inside the program.5.main() Function Section- Every C program must have a special function namedmain(). The program execution begins from here. The statements with functionare enclosed within a pair of braces {}. It has 2 parts:
Declaration Part – to declare all the variables used in executable part
Executable Part – is the actual program where processing is done.6.Sub Program Section – Function is a self contained block of statements that performs a specific task. This is a section for user defined functions that are called by the main() function. 
Character Set
A character denotes any alphabet, digit or a special symbol used to representinformation. Valid character sets allowed in C are:AlphabetsA Z and a zDigits0 9Special Symbols~ ` ! @ # $ % ^ & * ( ) _ - + = | | { } [ ] : ; ” ’ < > , . ? /
Identifiers and Keywords
User defined objects like variables, function, labels are called identifiers. The firstcharacter of every identifier must be an alphabet or an underscore (_). Identifiers in Care case sensitive. Identifiers cannot be the same as a C keyword.Keywords are the words whose meaning has already been explained to the Ccompiler. Keywords cannot be used as a variable name because if we do so we aretrying to assign a new meaning to the keyword, which is not allowed. Keywords arealso called ‘reserved words’. There are 32 keywords available in C:autobreakcasecharconstcontinuedefaultdodoubleelseenumexternfloatfarfo
 
gotoifintlongnearregisterreturnshortsignedstaticstructswitchtypedefunionunsignedvoidwhile

Activity (6)

You've already reviewed this. Edit your review.
1 thousand reads
1 hundred reads
frzvsdk liked this
Shivani Reddy liked this
Mukesh Goud liked this
jadae911 liked this

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->