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                      
tip       Ask Questions on ANYTHING, that arise in your Daily Life at     FORUM9.COM
Google
   
 
 Categories >> Software >> Programming Languages >> C++ >> OOPS       
Suggest New Category 
 


 

View Page with Answers
  Question  Asked @ Answers Views     select
 
What is the use of fflush(stdin) in c++? HCL   4  948
difference between abstraction and encapsulation with progarammatic eg. hi,just recently i went for an interview .The interviewer asked what is the difference between abstraction and encapsulation with programmatic eg. I gave the answer as encapsulation mean hiding the relevant data which is not useful for the user, eg a electric fan .hiding the information how the electricity is converted into machanical energy. abtraction showing only the relevant data to the user eg electric fan. it look ,its color ,it design etc only relevant data. Then the interviewer asked me, give me some programmic eg .I Said Let assume a web form having control like textbox,button etc. The user can view textbox,button etc this is the eg of abstraction and when the user click on the button how he is redirected is not known by the user is the eg of the encapsulation. Am I Correct .was the answer given by me is perfect .now i am planing to go for an another interview should i give the same answer.IF not please suggest me a better answer.with some good eg Please help  1  587
what is the abstract class,interface ,its difference with a programatic eg.? hi,recently i went for an interview they ask me what is abstract class ,interface and its difference I said abstract class contain abstact method ,abstract method is a method with no body.Abstract class cannot be instantiated.Abstract class is a base class it required derived class for the implementation of method. Interface is a syntactical contract that all derived class should follow it define properties ,method,events which are known as member of interface. Then They asked me what is the difference between them. I said abstract class interface 1.abstact class can implement method 1.interface cant 2.abstact class can contain constructor, 2.interface cant destructor 3.abstract class cannot support multiple 3.interface support inheritance etc Then they said some different answer I said dont no. Then they ask me when i should make abstract class for an project and when i should make interface. I said if suppose there is two class which must be having method with different logic then we sholud make abstract class. and if suppose we have two class having method .with different logic then we can make interface . Am i correct with my explaination.if not correct me .please provide me that when should we create abstract class and interface and what is difference .please help me  1  502
What is the difference between Home and $Home? TCS  2  909
What is the default size allocated for array in the statement if size not specified " int a[] " CTS  4  2668
What is a macro? And how is a macro same as a template?  3  796
What is the use of unnamed namespaces in OOPS? The only advantage I know is that they dont need the scope resolution operator while accessing them. I want to know some other advantages of unnamed namespaces...  2  567
What do we mean by a hidden argument in C++?  1  710
What do we mean by a hidden argument in a function? TCL  1  519
what is mean by design pattern  4  787
function overridind means and simple program  2  402
inheritence with example  1  825
Out of 4 concepts, which 3 C++ Follow? TCS   1  1503
some one give d clear explanation for polymorphism  3  928
what are the different types of qualifier in java? TCS  0  199
E-Mail New Answers        Answer Selected Questions        Post New OOPS Question
Prev    1   ... 4   ... 7    9   [10]    11  ... 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
 
They started with the brief introduction followed by few basic C++ questions on polumorphism, inheritance and then virtual functions. What is polymorphims? How you will access polymorphic functions in C? How virtual function mechanism works? 117  
2. Give the different notations for the class.\ 157  
what is graphics 147  
why we are declare the function in the abstract class even though we are declaring it in Derived class? 180 TCS
How to use CMutex, CSemaphore in VC++ MFC 753 Persistent
officer say me - i am offered to a smoking , then what can you say 43  
what is the drawback of classical methods in oops? 421  
What is the renewal class? 400 Ebix
#include <string.h> #include <stdio.h> #include <stdlib.h> #include <conio.h> void select(char *items, int count); int main(void) { char s[255]; printf("Enter a string:"); gets(s); select(s, strlen(s)); printf("The sorted string is: %s.\n", s); getch(); return 0; } void select(char *items, int count) { register int a, b, c; int exchange; char t; for(a = 0; a < count-1; ++a) { exchange = 0; c = a; t = items[ a ]; for(b = a + 1; b < count; ++b) { if(items[ b ] < t) { c = b; t = items[ b ]; exchange = 1; } } if(exchange) { items[ c ] = items[ a ]; items[ a ] = t; } } } design an algorithm for Selection Sort 21  
class CTest { public: void someMethod() { int nCount = 0; cout << "This is some method --> " << nCount; } }; int main() { CTest *pctest; pctest->someMethod(); return 0; } It will executes the someMethod() and displays the value too. how is it possible with our creating memory for the class . i think iam not creating object for the class. Thanks in Advance... Prakash 155  
Why is it so that we can have virtual constructors but we cannot have virtual destructors? 685  
write a program to enter a string like"sunil is a good boy and seeking for a job" not more than 10 characters including space in one line,rest characters should b in other line.if the next line starts from in between the previous word,then print whole word to next line. 199 Wipro
E-Mail New Answers        Answer Selected Questions
 
 
 
 
 
 


   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2012  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com