Before we study basic building blocks of the C program, let us covered the minimum structure of C program
THE C PROGRAM BASICALLY CONSISTS:-
· Header file
· Functions
· Data types
· Keywords
· Variables
· Statement & Expressions
1] Header file: -
The first line of program is containing the header file like #include<stdio.h>.
#include
This is pre-processor directive or command. It is not a part of our program. It is an instruction to the compiler to make it do something. It tells to compile to include contents of file.
o <stdio.h>
This is the name of the standard library definition file for all standard input, output.
o <conio.h>
This is the name of the for all Console input / Output function’s.
o <math.h>
This function is used to all mathematical expressions, like sin, cos, log, etc.
2] Variables:-
A variable is a data name that is used to store a data value. A variable is capable of taking up different values during the execution of the program. A variable name can be chosen such that it has some meaning. This becomes useful during the execution of the program.
Following are rules for constructing variable names:
a. A variable name is any combination of 1 to 8 alphabets, digits and underscores.
b. The first character in the variable name should be an alphabet.
c. No commas or blanks are allowed within a variable name.
d. No special symbol other than underscore can be used in variable name.
e. The variable name should not be a keyword.
f. The variable name is case sensitive.
Variable definition
A variable definition means to tell the compiler where and how much to create the storage for the variable. A variable definition specifies a data type and contains a list of one or more variables of that type as follows:
data_type variable_list;
E.g. int a,b,c;
3] Functions: -
A function is an independent block of statements that perform a specified (logical) task. The specified task is repeated each time the program call the function.
Functions are basically used to break down large computing tasks to smaller ones. They are used for modular development of programs.
Type of Function:-
1. Library Function
2. User Defined Function
1. Library Function:-
These functions are not required to be written by the user because they are provided by “C” & can be include in any program by including the header file.
E.g. printf(); ,scanf(); ,clrscr(); ,getch(); .
2. User Defined Function :-
It has to be developed by the user at the time of writing a program.
The user defined function:
1. Needs to be declared
2. Needs a body
3. Needs to be called.
Note:- All the function by default return integer type data.
4] Data Types:-
It is defined the set of values that variable can store along with a set of operation that can be performed on that variable.
Type----Storage ------sizeRange
1) Char-----1 byte--------128 to 127 or 0 to 255
2) Unsigned char-----1 byte-----0 to 255
3) Signed char-----1 byte-------128 to 127
4) Int-----2 bytes -----2,147,483,648 to 2,147,483,647
5) Short----2 bytes------32,768 to 32,767
6) Float-----4bytes-----+/- 3.4e +/- 3
5] Key-words:-
All the words that have a predefined meaning in C are called as Key-word. E.g. double, break, else, case, switch, etc. All the Key-words should be written in lower case. Variable of these names cannot be used.
There are the 32 Key-words into the C-programming language.
They are following:
auto--break--case--const--continue--default--do--double--enum--extern--float--for--goto--if--int--long--register--return--short--signed--sizeof--static--struct--switch--typedef--union--unsigned--void--volatile--char--else--while...
6] Structure of “C” program: -
#include<stdio.h> // Header file
#include<conio.h> // Header file
void main() // Main function
{
<variable declaration >; // Variable declaration
statement 1;
.
statement N;
getch();
}
Hi All!
ReplyDeleteWe are selling fresh & genuine SSN Leads, with good connectivity. All data is tested & verified.
Headers in Leads:
First Name | Last Name | SSN | Dob | Address | State | City | Zip | Phone Number | Account Number | Bank Name | DL Number | Routing Number | IP Address | Reference | Email | Rental/Owner |
*You can ask for sample before any deal
*Each lead will be cost $1
*Premium Lead will be cost $5
*If anyone wants in bulk I will negotiate
*Sampling is just for serious buyers
Hope for the long term deal
For detailed information please contact me on:
Whatsapp > +923172721122
email > leads.sellers1212@gmail.com
telegram > @leadsupplier
ICQ > 752822040