how much classes are used in c++

Answers were Sorted based on User's Feedback



how much classes are used in c++ ..

Answer / thana_8889

We can use more classes these are userdefined and builtin
classes

Is This Answer Correct ?    17 Yes 1 No

how much classes are used in c++ ..

Answer / saurabh

We can use as many classes as we want in our program..

By the way AMIT, main() is a function and not a class

Is This Answer Correct ?    9 Yes 1 No

how much classes are used in c++ ..

Answer / preeti goyal

In each program main is a function. but main is also hold
by a class so atleast one class is necessary.

Is This Answer Correct ?    2 Yes 1 No

how much classes are used in c++ ..

Answer / praveen

There is no limit,,Many class can be created.

Is This Answer Correct ?    0 Yes 0 No

how much classes are used in c++ ..

Answer / amit

WE CAN DEFINE AS MANY CLASSES AS WE WANT.THERE IS NO
RESTRICATION.BUT THERE IS ATLEST ONE CLASS i.e. main()

Is This Answer Correct ?    8 Yes 14 No

Post New Answer

More OOPS Interview Questions

what is SPL in c++.

1 Answers  


what is difference between c++ language and java language

5 Answers  


In multilevel inheritance constructors will be executed from the .... class to ... class

2 Answers   ABCO, TCS,


#include <stdio.h> #include <alloc.h> #include <stdlib.h> #include <conio.h> void insert(struct btreenode **, int); void inorder(struct btreenode *); struct btreenode { struct btreenode *leftchild; struct btreenode *rightchild; int data; }; main() { struct btreenode *bt; bt=(struct btreenode *)NULL; int req,i=1,num; clrscr(); printf("Enter number of nodes"); scanf("%d",&req); while(i<=req) { printf("Enter element"); scanf("%d",&num); insert(&bt,num); i++; } inorder(bt); } void insert(struct btreenode **sr, int num) { if(*sr==NULL) { *sr=(struct btreenode *)malloc (sizeof(struct btreenode)); (*sr)->leftchild=(struct btreenode *)NULL; (*sr)->rightchild=(struct btreenode *)NULL; (*sr)->data=num; return; } else { if(num < (*sr)->data) insert(&(*sr)->leftchild,num); else insert(&(*sr)->rightchild,num); } return; } void inorder(struct btreenode *sr) { if(sr!=(struct btreenode *)NULL) { inorder(sr->leftchild); printf("\n %d",sr->data); inorder(sr->rightchild); } else return; } please Modify the given program and add two methods for post order and pre order traversals.

0 Answers  


can you explain how to use JavaBean in Project

3 Answers   Infosys, Satyam,






for example A,B,C,D are class all the 4 class contain one method who() but the method who() implementaion is differnet among each class. the relation among the 4 class are A is base class and is inherited by B and C.and from this two B and C where D is inherited. the question is i want to display the output who() method in all the classes(A,B,C,D)the output of who() method is diferrent amond all the class(A,B,C,D) ------A------ virtuval who(print a) override | | who(print b) B C override who(print c) | | -------D------ override who(print d)

2 Answers  


What does and I oop mean?

0 Answers  


Write a program to accept a number and to print numbers in pyramid format? for eg:for a no. 5 1 212 32123 4321234 543212345

7 Answers  


What do you mean by variable?

0 Answers  


What is multiple inheritance? Give Example

6 Answers   Mind Tree,


Can we create object of abstract class?

0 Answers  


What is class encapsulation?

0 Answers  


Categories