BCA Semester 1
Unit 1 Notes
Prepared by: Ghanishta Mishra
Introduction to C
C is a powerful, general-purpose, and procedural programming language developed by Dennis
Ritchie at Bell Laboratories in 1972. It was originally created to develop the UNIX operating
system, but its speed, efficiency, and flexibility made it one of the most widely used
programming languages in the world.
C is often referred to as the mother of modern programming languages because many popular
languages, such as C++, Java, C#, and Objective-C, are based on its concepts.
C is its structured programming approach, which allows programs to be divided into
smaller functions. C also offers a rich collection of built-in operators, standard library
functions, and data types, enabling developers to write efficient and portable programs.
Features:
• Simple and easy to learn
• Portable
• Fast execution
• Structured programming
• Rich library functions
• Supports pointers
• Memory efficient
Structure of a C Program
, Character Set: A Character Set is a collection of valid characters that can be used to
write a C program.
Character Type Description Examples
Alphabets Uppercase and lowercase letters A-Z, a-z
Digits Numeric characters 0-9
Special Symbols Symbols used in programs +, -, *, /, %, &, #, ;, { }, ( )
White Spaces Used to separate words Space, Tab, New Line
Tokens: A Token is the smallest meaningful unit in a C program.
Token Type Description Example
Keywords Reserved words int, float, if
Identifiers User-defined names age, sum
Constants Fixed values 10, 3.14
Strings Sequence of characters "Hello"
Operators Perform operations +, -, *, /
Special Symbols Special characters ;, { }, ( )
Keywords: Keywords are reserved words that have predefined meanings and cannot
be used as identifiers
Keyword Purpose
int Integer data type
float Decimal data type
char Character data type
double Double precision data type
if Conditional statement
else Alternative condition
for Loop
while Loop
break Exit loop
continue Skip current iteration
return Return value from function
void No return value