-
-
-
Operators
In the following code fragment, which is the calling object for the less-than operator?string s1, s2;if( s1 < s2 )Choose one answer. a. s1 b. < c. s2 d. none
-
STL - Vector
What is the context of one and two after the following frsgment of code is executed?vector one(7, string("one"));vector two(one.begin() + 2, one.end()-3);
-
Classes
Given the following class, what is syntactically wrong with the implementation of the display function?class Rational{public: Rational( ); Rational(int numer, int denom); Rational(int whole); int getNumerator( ); int getDenominator( ); friend void display(ostream& out, const Rational& value);private: int numerator; int denominator;};void display(ostream& out, const Rational& value){ out
-
Register Relation
Why p++ is faster than p+1?
-
Use of C++ in Daily Life
Do you agree or not that "Object Oriented Programming basic paradigms like Abstraction, Encapsulation, Aggregation, Composition, Inheritance, Polymorphism, Templates etc are based and works in a same way as human thinks and behave in our daily life? Justify your answer with very precise and to the point reasons.
-
Base Class Pointer with Derived Object
Base class has some virtual method and derived class has a method with the same name. If we initialize the base class pointer with derived object, calling of that virtual method will result in which method being called?
-
Memory Allocation
When is memory allocated for a function of a class? Is it when the program is complied, or only when the function is called?
-
Static Constant Function
Consider a static const function y() that is private member function of a class Y. What do the static and const mean? When could this function be used?
-
Copy Constructor
Explain what is copy constructor and what is the difference between copy constructor and overloaded assignment operator
-
What is the Size of an Empty Class
What is the logic behind size of an empty class = 1? (As per C++)Ex:class base {};main(){printf("Size of the Empty Class is: %dn", sizeof(base));}It gives output: Size of the Empty Class is: 1I have not got the reason / logic behind this.Can anyone help me?
-
-
C++ programming function help
I'm having some trouble trying to program these problems and putting them into the main function. Please help me by giving some advice or website that offer good information for me.1. Write a function that accepts a string of characters from a user and displays the string one word per line.2. Write a function that accepts a string of characters, then output all the characters of the string in a reversed...
-
-
-
-
-
C++ open ended experiment
The objective of this open ended experiment is to develop an ISE DEPARTMENT INFORMATION SYSTEM application using C++. The primary emphasis of the experiment is to understand and gain knowledge of principles of object oriented programming concepts so as to apply these concepts in implementing real world problems. Students should take this work seriously as these efforts will be useful for developing...
-
C++ Interview Questions
Ans