Preprocessor directive in C++
1. start with (#)
2. it is process by preprocessor
3. it is written in a single line
4. ( ; ) it is not used
(a) #include :- 1. It is a preprocessor directive
2.It used to include to header file in our program
1. Header file contain the library fun.
2. Syntax :- # include< iostream.h>
#include<headerfile.h>
#include<conio.h>
#include<math.h>
( b ) #define :- it is a preprocessor symbolic constant
#define symbolic constant
Ex.- #define g 9.8
#define pi 3.14
#define max 100
Main( ) :- 1. it is a user fun. with predefine name
2. main is fun. From where prog. Start running
3. main return an integer value
Int main ()
{
- ;
- ;
return 0;
}
Void fun.
{
- ;
- ;
}
Are you want reas algorithms then touch me
By default :- int ( C++)
By default :- void (C)
Ex. (1.) in the programme if we don't write anything then output is
Main ( )
{
}
Warning = fun. Should return a value in fun main ( )
Error= 0
1st program of c++
#include<iostream.h>
Void main()
{
Cout<<”hello programmer”;
}
If you have understood this subject then comment us or tell this post to your beautiful or talented friends
0 comments:
Post a Comment