What is the concept of file stream in C++? How is a file opened and closed in C++?
Latest Answer: File stream are opened when default constructor was called and closed during destructor called. ...
What are Default Constructor and Do Nothing Constructor
Latest Answer: I think Do nothing constructor is the one OS offered, which has no argument in it, of course no return type. The default constructor has the same signature as DO nothing constructor, but you can write some initialization there, it can be overloaded. In ...
How will you write object into file using file concepts in C++?
Latest Answer: A function in the class definition can be included which writes to the standard file stream and takes the name of target file as a parameter. Function prototype will be like this:WriteObjectToFile (const char* fileName){ofstream fout(fileName);fout
Write a program to count the number of characters in a string using pointers.
Latest Answer: int main(void) { char* str = "Hellolklklk"; int i=0; for(i=0; *str; i++, str++); printf("count= %dn", i);return 0;} ...
Latest Answer: The values we are passing at the time of calling a function are called arguments.and the values that get received in some variable during function call are called parameters. ...
i know that function name is same. but each time we are writing code for each function.then in which way it is advantageous than normal function.
why we fallow top down approach in c-language and bottom up approach in c++?explain?
Latest Answer: Top-down approach views from generalizaton to specilization where as bottom-up approach does the reverse of it. ...
Why is Dynamic binding (regarding DLLs) are considered better in comparison with static binding? What are DLLs and how they work?
Latest Answer: While generating the binary executable, a compiler have two options:1. It can include the helper libraries (third party libraries for example) with the exe file in binary form which increases the size of the final exe but the exe file can run on its own ...
Using inheritance, which of the following is not alloweda) Changing implementation of operation in parent by the subclassb) Using implementation of operation in parent class by the subclassc) Using attributes
Latest Answer: We can override the implementation of parent class but we cannot change implementation from child class. So 'A' is not correct. ...
What is the most efficient way to reverse a linklist?
Latest Answer: #include#include#includeclass Node{ public: int data; Node(int data); Node *next; void display();};Node::Node(int data){ this->data=data;}void Node::display(){ cout
View page << Previous 1 [2] 3 4 5 6 7 8 9 10 Next >>

Go Top