In this website you will cracked Computer CCC,CCC+,O-LEVEL,etc.
"Education Is The Key To Unlock The Golden Door Of Freedom"
✍Character set is a set of Valid Characters that a language can recognize.The character set in C language consist of the upper and lower case alphabets ,Digit,special Character and white space.There are Two type of character set in c laguage.
1-Source Characters.Source Character
source character are entered directly into the source program by typing by the keyboard.
They are interpreted by the computer(as the appear on the screen) at
compile time.These are 4 type.
(i).Alphabets:-
(a).Uppercase letters - A-Z(ii).Digits:-
0,1,2,3,4,5,6,7,8,9(iii).Special Character:-
(iv).White space:-
Execution Character/Escape Sequences
Execution Character/Escape Sequences are those character which can not be typed by the keyboard or not display on the screen as such.An Escape Sequences always begins with a Backslash(\).
Rule of constructing Identifiers.
✔The first character in an identifier must be an alphabet or an underscore and can be followed only by any number alphabets, or digits or underscores.Example:-
❶Valid Identifiers. total,sum ,average,_x,y_, mark_1 , x1Types of Identifiers.
C defines two kinds of identifiers:
Internal identifier:- If the identifier is not used in an external link process, then it is called as internal. These identifiers are also known as internal names;✍A Variables is an Identifier that is used to represent some specified type of information within a designated portion of a program.Variable holds data that can be modified during program execution.After declare a variable in a program , you can assign it a value.
Assigning a Name to a variable.
✔Variable can consist of any sequences of letters,Digits,and special character.No other special character are allowed. ✍C programs are constructed from a set of reserved words which provide control and from libraries which perform
special functions.The Predefine reserved on C language called the Keywords.
Rule of Keywords.
➢The keywords are also called ‘Reserved words’.Types of Keywords.
Generally in C programming language 32 Keywords are avilables.These keywords are divided in many parts.These are following.....
❶Data type Keywords:-
int Specifies the integer type of value a variable will hold.❷Qualifier Keywords:-
signed Specifies a variable can hold positive and negative integer type of data .❸Loop Control Structure Keywords:-
for Loop is used when the number of passes is known in advance.❹User-defined type Keywords:-
typedef Used to define a new name for an existing data type.❺Jumping Control Keywords:-
break Used to force immediate termination of a loop, bypassing the conditional expression and any remaining code in the body of the loop.❻Storage Class Keywords:-
auto Memory Till the control remains within the block.❼Decision type Keywords:-
if❽Derived type Keywords:-
struct❾Function type Keywords:-
void❿Other type Keywords:-
const✍Constants in C are fixed value that does not change during the execution of a program. Constants can be of any of the basic data types. C supports several types of constants in C language.
❶Numeric Constant:-
Numeric Constant(literal) has a constant value in number.The value of the constant can be positive and negative numeral.These are two type of numeric constant.
(i)-Integer Constant:-
In C language they are Decimal,Octal,and Hexadecimal.An integer constant must have at least one digit.
(a)-Decimal integer Constant:-
✔ It consists of any combinations of digits taken from the set 0 through 9, preceded by an optional – or + sign.
✔The first digit must be other than 0.
✔Embedded spaces, commas, and non-digit characters are not permitted between digits.
Example: 45, -55, 5 etc....
(b)-Octal integer Constant:-
✔It consists of any combinations of digits taken from the set 0 through 7.
✔If a constant contains two or more digits, the first digit must be 0.
Example: 045, 0578, 003, 010, 0127 etc.......
(c)-Hexadecimal integer Constant:-
✔It consists of any combinations of digits taken from the set 0 through 7 and also a through f (either uppercase or lowercase).
✔The letters a through f (or A through F) represent the decimal quantities 10 through 15 respectively.
✔This constant must begin with either 0x or 0X.
Example: 0X58, 0XFF, 0X1C, 0X0, 0X3, 0X15, -0X57 etc.....
(ii)-Real Constant:-
(a)- Use of Real or Floating-point constants:-
Integer numbers are inadequate to represent quantities that vary continuously, such as distances, heights, temperatures, prices and so on.
These quantities are
represented by numbers containing fractional part. Such numbers are called real or floating point constants.
(b)-Express a real constant in Exponential form:-
A real constant is combination of a whole number followed by a decimal point and the fractional part.
If the value of a constant is either too small or too
large, exponential form of representation of real constants is usually used.
In exponential form, the real constant is represented in two parts.
Mantissa:-The part appearing before e, the mantissa is either a real number expressed in decimal notation or an integer.
Exponent:-The part following e, the exponent is an integer with an optional plus(+) or minus(-) sign followed by a series of digits
.The letter e separating the
mantissa and the exponent can be written in either lowercase or uppercase.
7500000000 can be represented in exponential form as 7.5e9 or 75E8
The Real Constant to Represent number containing fractional parts.
✔It is allowed to omit digit before or after the decimal points..Exp:25. ,.45,-.55 etc...❷Character Constant:-
Character constant is either a single alphabet or a single& string.
(i)- Single Character Constant:-
Character constant is either a single alphabet or a single digit,or single special symbol enclosed within a pair of a single quotation mark..Exp:- 'A', 'a', '.', '?'
(ii)- String Constant:-
A string constant or literal is a sequence of Alphanumeric characters enclosed in Double Quotation(")marks.
The maximum length of string constant is
limited to 255 Character.Each string constant is automatically added with
terminating character '\0'.Thus the string "abc" will actually be represented as
"abc\0".
❸Backslash Character constants:-
Each Character has unique ASXII value.These are Non-Printable character.
❹Symbolic constants:-
A symbolic constant is a constant that is represented by Name(symbol) in the program.A symbolic constant also does not change its value.
✔No space is allowed between # and the word.Note:-Legal Declaration.... #define a 2, #define PI 3.14
Invalid Declaration....#define a=2 //no.C.E.//warning, #define a 2;//No C.E.