ALLInterview.com :: Home Page            
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Google
   
 
 Categories >> Software >> Programming Languages >> C++ >> OOPS       
Suggest New Category 
 


 

View Page with Answers
  Question  Asked @ Answers Views     select
 
Can anyone please explain runtime polymorphism with a real time example??at what ciscumstances we go for it??  1  546
define oops concept with example Cap-Gemini   0  198
Is this job good for future? can do this job post grduate student?  0  197
c++ provides classes...and classes do what we want but why then strcut are used...if we say data hiding... it is also provided by c++ in structs then why to prefer clasess TCS   1  427
Write a program to implement OOPS concepts such as inheritance, polymorphism, friend function, operator overloading? TCS  0  785
Write a program to reverse a string using recursive function? TCS  0  314
which structured data type is not used in c++? 1.union 2.structure 3.string 4.boolean HCL   2  869
Write a C++ program without using any loop (if, for, while etc) to print prime numbers from 1 to 100 and 100 to 1 (Do not use 200 print statements!!!) HCL  0  337
why we are declare the function in the abstract class even though we are declaring it in Derived class? TCS  1  282
c++ is a pure object oriented programming or not? Wipro  5  783
hi all..i want to know oops concepts clearly can any1 explain?? Eureka-Forbes  0  225
How can i write a code in c# to take a number from the user and then find all the prime numbers till the number entered by the user. NIIT   4  829
Hi All, I am new to programming and want to know how can i write a code to take input of 2 numbers from user and swap it without using a temp variable? NIIT  2  423
How many types of access specifier in c# and vb.net? Infosys  1  936
What is debug class?what is trace class? What differences are between them? With examples.  0  198
E-Mail New Answers        Answer Selected Questions        Post New OOPS Question
Prev     1   [2]    3  ... 7   ... 10   ... 13   ... 16   ... 19   ... 22   ... 25   ... 28   ... 31   ... 34   ... 37    Next
 
 
    STL Interview Questions     OOPS Interview Questions     C++ General Interview Questions
 
 
 
Un-Answered Questions
 
 Question Views Asked at   Select
 
write a code for this:trailer recordId contains a value other than 99, then the file must error with the reason ‘Invalid RECORD_ID’(User Defined Exception). 270  
what is the sylabus for priliminaries? 205  
What is Difeerence between List obj=new ArrayList(); and ArrayList obj=new ArrayList()? 573 SRA
why reinterpret cast is considered dangerous? 112 TCS
explain sub-type and sub class? atleast u have differ it into 4 points? 304 Infosys
Write a C++ program without using any loop (if, for, while etc) to print prime numbers from 1 to 100 and 100 to 1 (Do not use 200 print statements!!!) 337 HCL
Write a c++ program to display pass and fail for three student using static member function 465  
define oops concept with example 198 Cap-Gemini
This program numbers the lines found in a text file. Write a program that reads text from a file and outputs each line preceded by a line number. Print the line number right-adjusted in a field of 3 spaces. Follow the line number with a colon, then one space, then the text of the line. You should get a character at a time and write code to ignore leading blanks on each line. You may assume that the lines are short enough to fit within a line on the screen. Otherwise, allow default printer or screen output behavior if the line is too long (i.e., wrap or truncate). A somewhat harder version determines the number of spaces needed in the field for the line numbers by counting lines before processing the lines of the file. This version of the program should insert a new line after the last complete word that will fit within a 72-character line. 209  
Question In a class, there is a reference or pointer of an object of another class embedded, and the memory is either allocated or assigned to the new object created for this class. In the constructor, parameters are passed to initialize the data members and the embedded object reference to get inialized. What measures or design change should be advised for proper destruction and avioding memory leaks, getting pointers dangling for the embedded object memory allocation? Please suggest. Question Submitted By :: Sunil Kumar I also faced this Question!! Rank Answer Posted By Re: In a class, there is a reference or pointer of an object of another class embedded, and the memory is either allocated or assigned to the new object created for this class. In the constructor, parameters are passed to initialize the data members and the embedded object reference to get inialized. What measures or design change should be advised for proper destruction and avioding memory leaks, getting pointers dangling for the embedded object memory allocation? Please suggest. Answer # 1 use copy constructors 0 Shanthila There is something to be taken care in destructor, in copy constructor, suppose the memory is assigned to the embedded member object pointer with the parameter passed value, but if some other objects of different class also are pointing to this memory, then if some one deletes the object then this class member pointer object will become dangling, or if the object is not deleted properly then there will be memory leak. Please suggest the design change required to handle or avoid this situation 296 TCS
when to use 'mutable' keyword and when to use 'const cast' in c++ 176 TCS
What is interface? When and where is it used? 211  
E-Mail New Answers        Answer Selected Questions
 
 
 
 
 
 


   
Copyright Policy  |  Terms of Service  |  Articles  |  Site Map  |  RSS Site Map  |  Contact Us
   
Copyright © 2013  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  KalAajKal.com