C P Notes Submitted By: Dewanand Giri BSC - CSIT First Sem Sec A Roll:8 Submitted To: Prof - Mohan Bhandari
C P Notes Submitted By: Dewanand Giri BSC - CSIT First Sem Sec A Roll:8 Submitted To: Prof - Mohan Bhandari
C P Notes Submitted By: Dewanand Giri BSC - CSIT First Sem Sec A Roll:8 Submitted To: Prof - Mohan Bhandari
SUBMITTED BY :
Dewanand Giri
SEC A
Roll:8
SUBMITTED TO :
Prof.Mohan Bhandari
CHAPTER 2
ELEMENTS OF C
*Every computer programming language is a set of syntax
features.)
new data types long int and unsigned int and the compound
proposed by K&R C.
ANSI
official standard of C.
So, it was absolutely essential for some standards
C99
that for the lifetime of the pointer, only the pointer itself or a
added in C99. A new integer data type called long long int with
Embedded C
Fundamental of C
Character set of C
1. Keywords
Keywords are the predefined reserved (built-in) words
than the task for which it has been defined. For example:
identifiers.
as an identifier.
an identifier.
3. Constants
Numeric constants:
It consists of:
categorized as:
quote mark (‘ ’). Thus, ‘X’, ‘5’ are characters but X, 5 are not.
String constant:
String constants are a sequence of characters enclosed in
4. Delimiters
delimiters are:
constants.
constant.
#include
void main()
{
int a,b,c[10];
label_num:
printf("hi");
goto label_num:
}
5. Operators
manipulate data.
Variables
underscore.
blanks.
-Declaring variable
is.
can hold.
Syntax:
Data_type variable_names;
For example:
int account_number;
float a, b, c;
char name[10];
Data Types
Data types are used to declare the variables and tell the
compiler what types of data the variable will hold. Data type
is useful in C that tells the computer about the type and nature
be categorized as:
These are the basic data types. There are four basic data types
use later.
symbolic constants.
are used in more than one function. Such variables are called
opening brace and ends at the closing brace. The closing brace
semicolon.
➢ Sample C Program:
In C many library functions are grouped category-wise and
Statement