C PROGRAMMING TUTORIALS
Hello and welcome to our site. Today's blog is about basics of C programming. C itself is a very basic language of
- Preprocessor - Preprocessor are used to process files of C. It is denoted by "#".
- Header Files - Header files are files that contain functions declarations. The example - studio is a header file in C. Header files are used
with . extension.h - Data Types - Data types in C are of 2 types
- 1. Primary Data Types 2. User Defined Data Types
- Primary Data Types - void, int, char, float
- User Defined Data Types - structure, union, pointer, array.
- Functions - C program can be viewed as a set of functions.
- Functions can be identified by "()".
- Example - main (),
(). Note - mainprintf ) is a compulsory function.( - Execution of
starts from function mainprogramme ).( - Constants - A constant is a quantity that does not change during the program execution.
- There are 4 types of constants
- 1. Integer 2. Real 3. Character 4. String
- 1. Integer - Example- 3, 100, -89.
- 2.
- Example- 12.1 , 0.45. 3.Real Character - Character constant is denoted in single quotes. Example- 'S'. To access the characters, there are some pre-defined integer values in C which are known as ASCII values. A-Z = 67-90 a-z = 97-122 0-9 = 48-573. - 4. String - String constantly is denoted in double quotes
Example - "Ram".. - Keywords - Keywords are the words whose meaning
to the C compiler. We cannot use keywords as a variable name. Example- if, break, else.has already been explained - Variables - A variable can be considered as a name given to the location in memory where
constant is stored. Note - Variable name should not be a keyword.tge - Comments - Comments are used to understand
of any particular statement, group of statements or functions in the program. Comments are not the part of program execution. Comments start with /* and end with */.purpose
THANK YOU FOR YOUR SUPPORT AND CARE
No comments:
Post a Comment