GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Placement Papers  >  TCS  >  C
Go To First  |  Previous Question  |  Next Question 
 C  |  Question 80 of 87    Print  
TCS C/C++ Questions
1. Difference between "C structure" and "C++ structure".
2. Diffrence between a "assignment operator" and a "copy constructor"
3. What is the difference between "overloading" and "overridding"?
4. Explain the need for "Virtual Destructor".
5. Can we have "Virtual Constructors"?
6. What are the different types of polymorphism?
7. What are Virtual Functions? How to implement virtual functions in "C"
8. What are the different types of Storage classes?
9. What is Namespace?
10. What are the types of STL containers?.
11. Difference between "vector" and "array"?
12. How to write a program such that it will delete itself after exectution?
13. Can we generate a C++ source code from the binary file?
14. What are inline functions?
15. What is "strstream" ?
16. Explain "passing by value", "passing by pointer" and "passing by reference"
17. Have you heard of "mutable" keyword?
18. What is a "RTTI"?
19. Is there something that I can do in C and not in C++?
20. What is the difference between "calloc" and "malloc"?
21. What will happen if I allocate memory using "new" and free it using "free" or allocate using "calloc" and free it using "delete"?
22. Difference between "printf" and "sprintf".
23. What is "map" in STL?
24. When shall I use Multiple Inheritance?
25. Explain working of printf.
26. Talk sometiming about profiling?
27. How many lines of code you have written for a single program?
28. How to write Multithreaded applications using C++?
29. Write any small program that will compile in "C" but not in "C++"
30. What is Memory Alignment?
31. Why preincrement operator is faster than postincrement?
32. What are the techniques you use for debugging?
33. How to reduce a final size of executable?
34. Give 2 examples of a code optimization.



  
Total Answers and Comments: 17 Last Update: May 07, 2008     Asked by: Srikanth 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: Rajini
 
Q. Difference between "C structure" and "C++ structure".
Ans:- C structure cannot have member functions but C++ structure can have. Also in a C structure by default all data members of structure are public and access cannot be changed by specifying the private or protected keywords but in C++ eventhough by default members are public we may change the access using the keywords private and protected.
Q. What is the difference between "overloading" and "overridding"?
ans:- Overloading is a process of having the same function name but different no of arguments or types of arguments within the same class but overriding means redefining a baseclass functions definition in the subclass.
Q. Explain the need for "Virtual Destructor".
Ans:=Virtual destructor ensures destruction of subclass and base class objects in proper order.
Q. What are the different types of polymorphism?
Ans:-Overloading and overriding.
Q. What are the different types of Storage classes?
ans:-Auto,Register,static and extern
Q. What is the difference between "calloc" and "malloc"?
Ans:- calloc and malloc are used for dynamic memory allocation. Calloc initializes the memory locations to zero by default but malloc memory contains garbage values.
Difference between "printf" and "sprintf".
printf will write to the console. sprintf will write to the buffer

Above answer was rated as good by the following members:
vivnayar, ratneshict
  Sorting Options  
  Page 1 of 2   « First    1    2    >     Last »  
December 15, 2005 06:25:10   #1  
sambaiah bethapudi Member Since: November 2005   Contribution: 1    

RE: TCS C/C++ Questions
Diffrence between a "assignment operator" and a "copy constructor"

 
Is this answer useful? Yes | No
March 03, 2006 10:39:02   #2  
Angayarkanni.M        

RE: TCS C/C++ Questions

Assignment Operator:

         The Assignment operator simply assigns the value of the expression found in the right hand side.

  Syntax : variable = expression;

Copy Constructor:

         The copy constructor copies the data values from one object to another object.When we use statements like c1 = c2 where c2 & c1 are the objects of a class,the c++ compiler implicitly creates a copy constructor and copy the values of c2 to c1.we may also invoke the copy constructor as follows:  classname objectname1(objectname2);


 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
May 04, 2006 03:00:52   #3  
navinece Member Since: April 2006   Contribution: 1    

RE: TCS C/C++ Questions
what is map in stl
 
Is this answer useful? Yes | No
May 17, 2006 05:47:04   #4  
ASHOK SRIVASTAVA        

RE: TCS C/C++ Questions
Excellent
 
Is this answer useful? Yes | No
May 20, 2006 12:15:35   #5  
sujith kurian        

RE: TCS C/C++ Questions
No other words.... Only thanks a lot......
 
Is this answer useful? Yes | No
July 10, 2006 03:06:01   #6  
baburk Member Since: July 2006   Contribution: 1    

RE: TCS C/C++ Questions
asdfsdf
 
Is this answer useful? Yes | No
July 10, 2006 07:51:01   #7  
anitha        

RE: TCS C/C++ Questions

Excellent


 
Is this answer useful? Yes | No
August 29, 2006 07:37:08   #8  
vinoth.k        

RE: TCS C/C++ Questions

excellent !


 
Is this answer useful? Yes | No
October 24, 2006 08:05:12   #9  
ashok        

RE: TCS C/C++ Questions
pls ..friend where can i found answers to this question..
 
Is this answer useful? Yes | No
November 28, 2006 00:22:44   #10  
pavankishore        

RE: TCS C/C++ Questions


Re:3rd question

Overloading means the ability to have more than one form.this is also called polymorphism.

it maybe method or operator overloading.

Overriding occurs when we have same method in both subclass and superclass

 


 
Is this answer useful? Yes | No
  Page 1 of 2   « First    1    2    >     Last »  


 
Go To Top


 Sponsored Links

 
Sponsored Links

 




About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape