OOP Through C++
Ans:-read above encapsulation and polymorphism
1.4-Create,Compile,link and execute a C++ program
Ans:-create-type c++ program(ex:student.cpp)
Compile:- Use Alt + F9(student.cpp->student.obj)
Link and execute:-link->run(Use Ctrl + F9)
1.5-Differentiate C , C++(difference between c and c++)
C follows the procedural style
both procedural and object oriented.
Data is less secured in C.
In C++, you can use modifiers for class
members to make it inaccessible for outside
C follows the top-down approach.
C++ follows the bottom-up approach.
C does not support function
C++ supports function overloading.
In C, you can't use functions in
In C++, you can use functions in structure.
C does not support reference
C++ supports reference variables.
In C, scanf() and printf() are
mainly used for input/output.
C++ mainly uses stream cin and cout to perform
input and output operations.
Kshatriya College Of Engineering-KCEA