use of static and friend function in a class
Latest Answer: The keyword static indicates that the function is part of the class, but does not take the object as the hidden "this" parameter. This is useful for example when you need a custom creation step of the class object [beyond what you can do in ...
main(){ int a=2.9; float b=9; cin>>"%d %f">>a>>b; return();}
Latest Answer: This program will generate a compiler error. The format specification is only required for printf, cout doesnot need the "%d %f" to print the variable values. ...
Hi,Iam very much new to programming and C++please help meI have an application that uses socket++ classes on Unix (AIX) environmentI have included #include in two of my .cpp filesand I have socket++ source
Latest Answer: hi,Does the environment variable PATH contain the path of the folder in which the header files are present??If not, then either modify the PATH variable, or use -I option to specify the location of header files.eg. cc -I$HEADER_FILES_PATH -o myProgram ...
How much memory is allocated with the statements below?(i) short* ps = (short*) malloc (100); (ii) short* ps = (short*) new short (100);
Latest Answer: short* ps = (short*) malloc (100);malloc will allocate 100 bytes and then convert it to short type...short* ps1= (short*) new short (100);this creates a memory of size short and assign the value 100 to *ps1. ...
Which of the following statements about overloading/overriding is FALSE?A. Overloading is a method that allows the definition of multiple member functions with the same name but different signatures.B.
Latest Answer: D should the wrong.Run time polymorphism is based on overriding (based on virtuval function). ...
If a function takes a pointer to a pointer as a parameter, how would you return a new pointer?A. *lplpValue = pObj;B. lplpValue = pObj;C. **lplpValue = pObj;D. &lplpValue = pObj;
Latest Answer: *lplpValue = pObj;Dereferencing a double pointer once gives the memory location of the pointer which we need to update. ...
What's the Method Overriding and what's the difference between Method Overloading and Method Overriding.
Latest Answer: defining a new function with same name but signature is different is known as method oveloading.Define a new function with same name ( as in base class) in derived class is known as method override. In the derived class, base class defined method ...
this question is related to windows programming using VC++
Why we would use exception handling rather than different return values to signal an error?
Latest Answer: Using exceptions, it becomes easy to pass multiple types of values from a single function. Handling the exceptions is hirachical.If we dont have exceptions, it will be difficult to return multiple values from a function. ...
can access any private member of the base class through the derived class FUNCTION IF IT IS VIRTUAL?
Latest Answer: No way,Ex:#includeusing namespace std;class base{ private: int a; public: virtual void show() ...
View page << Previous 1 2 3 [4] 5 6 7 8 9 10 Next >>

Go Top