CPP
Introduction
Fill in the blanks
1.Who is the author of CPP Bjarne Stroustrup
2.Which year was CPP invented 1980
3.CPP Case Sensitive[T/F].
True
4.CPP middle level language
5.C++ Object oriented language.[T/F]. True
6.OOPs Means Object Oriented Programming Structure
7.CPP bottom up approach
8.Inheritance ,Operator Overloading doesn’t support in CPP[T/F]. False
9.How many keyword presents in CPP 32
10.double byte value 8
11. int byte value 2
12.char byte value 1
Answer the following Question
(10
marks)
1.Difference between C & C++
s.no. |
C |
C++ |
|||
1) |
C follows the structure
or procedural oriented language. |
C++ object oriented language. |
|||
2) |
Data is less secured in C. |
In C++, Data is more secured. |
|||
3) |
C follows the top-down approach. |
C++ follows the bottom-up approach. |
|||
4) |
C does not support function overloading. |
C++ supports function overloading. |
|||
5) |
In C, scanf() and printf() are
mainly used for input/output. |
C++ mainly uses stream cin and
cout to perform input and output operations. |
|||
6) |
Operator overloading is not possible in
C. |
Operator overloading is possible in C++. |
|||
7) |
C programs are divided
into procedures |
C++ programs are divided
into functions and classes. |
|||
8) |
C does not support the inheritance. |
C++ supports inheritance. |
|||
9) |
#include<stdio.h> Std -standard i -input o-output
|
#include<iostream.h> i-input o-output
input - cin output - cout |
|||
10) |
#include<conio.h> Console input output Getch clrscr |
#include<conio.h> Console input output Getch clrscr |
|||
11) |
main() { Program; } |
Void main() { Program; } |
|||
12) |
Sample program #include<stdio.h> #include<conio.h> main() { clrscr(); printf("hi hello\n"); printf("welcome to traineetech"); getch(); } |
Sample program #include<iostream.h> #include<conio.h> void main() { clrscr(); cout<<"hi hello\n"; cout<<"welcome to traineetech"<<endl; getch(); } |
|||
13) |
No OOPs concept |
OOPS -object oriented programming
structure Inheritance - generation Abstraction - data hiding Encapsulation - Data binding Polymorphism - Multi task Object - collections of data Class - collections of object |
No comments:
Post a Comment