what is Class in oops with example?
Answers were Sorted based on User's Feedback
Answer / sudhavasugj@gmail.com
Object is the variable of class in oops. Class is created
for do some behavior in program. The behavior is accessed by
creating the object for the particular class in main program.
Ex: computer c++;
computer - class
c++ - object
| Is This Answer Correct ? | 7 Yes | 0 No |
Answer / venkatesh
Class is a user defined datatype, and it is a logical representation of data(means which does not occupy any space)
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / elakiya.p
a class is a collection of similar object type.
for eg:
fruit mango;
->fruit is a user defined data type.
->mango is a object.
->fruit is also we called class.
->it behave like built-in types of programming language.
| Is This Answer Correct ? | 3 Yes | 0 No |
Can we have a private constructor ?
12 Answers HSBC, Ness Technologies, TCS, Wipro,
Why we are use # in begning of programme of c++.
Precompilation ?
Does c++ support multilevel and multiple inheritance?
#include <iostream> using namespace std; struct wow { int x; }; int main() { wow a; wow *b; a.x = 22; b = &a; a.x = 23; cout << b->x; return 0; }
When is an object created and what is its lifetime?
how to find the largest of given numbers in an array
write a program to find the largest of two numbers without using for,while,switch,if else, conditional operator and do while using c++ pgmng language
What is a class in oop?
What do you mean by inline function?
Is abstract thinking intelligence?
What is object in oops?