1 PreparedBy:Yasir AhmedKhan| email: firstname.lastname@example.org cell:03337015014
C is a programminglanguage developed at AT & T’s Bell Laboratories of USA in 1972 by Dennis Ritchie.
C is a computerProgramminglanguage that means that you can use c to create lists of instruction for a
computerto followcisone of thousandsof programminglanguages currently in use c has been around
for several decades and has won widespread acceptation because it gives programmers maximum
control and efficiency.Cisan easyto learnitisa bitmore cryptic initsstyle than some other languages,
but get beyond that fairly quickly.
FEATURES OF C LANGUAGE:
C is a case sensitive language
C is a collection of libraries
Libraries is a collection of Functions
Function is a collection of Statements
Statements is a collection of Collectors
C language can Support IDE “Integrated Development Envorment”
C language can support only Compiler Translators
A C file Must Be .cpp (C plus plus)
Keywords are the words whose meaning has already been explained to the C compiler (or in a
broad sense to the computer). The keywords cannot be used as variable names because if we
do so we are trying to assign a new meaning to the keyword, which is not allowed by the
computer. Some C compilers allow you to construct variable names that exactly resemble the
keywords. However, it would be safer not to mix up the variable names and the keywords. The
keywords are also called ‘Reserved words’.
IDE abbreviate as “Integrated development envorment”. It is a platform that we can type any c
program, compile, execution and display of results. IDE is a programming envorment that typically
consistof code editor, acompiler,adebugand graphical user interface (GUI). The IDE is May stay alone
application or may be included as a part of computer program. IDE is and interface between user and
computer that perform simultaneously.
COMMON EXAMPLE: GW-Basic, Visual Basic, C Language etc
2 PreparedBy:Yasir AhmedKhan| email: email@example.com cell:03337015014
Q: Define Header Files?
Headerfile isa collectionof functionthatfoundindifferentlibraries.A headerfileisalwaysdefine inthe
top of program and found in include directory. The header files are always assigned with sign of #. An
every header file contains different functions like <math.h> library is containing of different
Q: How Many Files to generate a compiler after the execution of C Program?
There are four files to generate a compiler automatically
The .Cpp isa source file thatbasedona c programmingcode withoutthisfile we cannot maintain other
files the extension of .cpp is recognize as c plus plus code
The backup file isautomatically generated file that provide backup of source code suppose the source
file isdeletedwe canuse backupfile asa source code butit necessarytorename the extensionof file as
The .obj is objectorientedfile thatcontain amachine code and store errors, values, and result oriented
machine code without the object file the source program cannot entertain.
.EXE (Executable File)
The Executable file isrunwithoutanysupportof program sometimes it called compiled file so the .exe
file is a powerful extension that execute computer programs and there is no need to install any
3 PreparedBy:Yasir AhmedKhan| email: firstname.lastname@example.org cell:03337015014
Q: Define Gotoxy Statements?
Goto xy statements:
The goto xystatementisusedto set the cursor on the screen and display text on the particular column
and row/line. There are 256 columns ( 0 to 255) and 25 rows (0 to 24).
SYNTEX: goto xy (C,R);
Printf(“ YASIR “);
Q: Define Goto Statements?
The goto statement is a branching statement that we can move the cursor in the particular line
sometimes we can say it’s a conditional statement.
SYNTEX: goto c;
The break statement is used to terminate the nearest statement or do, for , switch-case and while
statement. The break statement is also perform in loops it mean we can terminate in the mid of loop.
Printf(“ 2. Exit “);
Printf(“ C language “);
4 PreparedBy:Yasir AhmedKhan| email: email@example.com cell:03337015014
Q: Define Return Statements?
The return statement is used to terminate the execution of function and return to the calling of
function. The return function is also used to return the value of calling of function.
SYNTEX: return expression
If no return statement found in function definition, the control automatically returns to the calling of
function.If a returnvalue is not required, declare the function with the data type of void otherwise to
return the integer data type.
Q: Define Continue Statements?
The continue statement is used to pass the control of next iteration of the nearest do…while, and for
and by pass the remaining statements in the do, for, and while statement of the body.
The Continue statement is always perform when we cross of the body of the any loop and moves the
cursor or pointer in the next statement.
void main (void)
5 PreparedBy:Yasir AhmedKhan| email: firstname.lastname@example.org cell:03337015014
Q: Define Variable And Its Types?
A variable is a name of value that store unique value. A variable is a collection of characters
normally in any language a variable can perform very important role that capable to store
values. A variable can identify by their names like a,b,c,x,y,z
RULES OF VARIABLES:
A Variable must be a character
We cannot define numeric number as a variable
We can assign variables as a character and numeric like A1,A2,A3
We can assign a variable 8 to 12 characters
Variable are not allowed to assign special symbols
Example a=10; b=’c’;
We Cannot allow duplicate values
TYPES OF VARIABLES:
1. Constant Variable or String Value
2. Numeric Variable
A constant is a collection of characters and character may be A to Z, a to z.. 0 to 9, & $
The constant variable cannot change during the execution e.g b=’c’; z=55;
The numeric variable is use to store only numeric values e.g c=10(constant numeric value). The
variable may be change during the execution of computer program.
6 PreparedBy:Yasir AhmedKhan| email: email@example.com cell:03337015014
Q: What Are Data Types?
Data types are use to store which type of data stored in the variables. Data types are always
identifying by their name, data types is a computer memory location that store data. Data types
are always define in the beginning of computer program. There are various data types used in c
language but major are,
INTEGER DATA TYPE:
Integer data type is use to store sure numeric value. Integer data type is capable to store -
32768 to 32767 and accommodate 4bytes
SYNTEX: int a;
CHARACTER DATA TYPE:
Character data type is always store string value and occupies 2 bytes and store 0 to 255 at a
SYNTEX: char a;
FLOAT DATA TYPE:
Float data type is used to store numeric value with decimal places. A floating data type always
reserved 4 bytes with the range of 0 to 2.4e
SYNTEX: float a=10.2;