Simple
C program
|
Simple C++ program
|
#include<stdio.h>
void main()
{
printf(“c-language”);
}
Ouput:
c-language
|
#include<iostream.h>
void main()
{
cout<<“C++”;
}
Ouput:
C++
|
Note:
In c and c++ the
execution of the program starts with main and ends with main.
What ever we write
with in the main only.
With out main we
can not write a c or c++ program.
void:
void can be placed
before of any function then it can not return any value.
cout: this is used
to display the text or message or any data
cout source code is available in iostream.h
iostream means
input and output stream
stream: stream is an
intermediater in between input and output or stream is a flow of data.
<<:- it is called as insertion operator
>>:-it is called as extraction operator
|
Monday, 21 October 2013
Comparison of C and C++ Program
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment