What is "strstream" ?
Answer / sv
strstream is the class that specializes iostream to use a
strstreambuf for input and output with arrays of characters
in memory.
The class strstream provides functionality to read and
write to an array in memory. It uses a private strstreambuf
object to control the associated array. It inherits from
basic iostream and therefore can use all the formatted and
unformatted output and input functions.
| Is This Answer Correct ? | 3 Yes | 0 No |
Write a function which takes a character array as input and reverses it in place.
2 Answers Lehman Brothers, Vision Infotech,
When does the c++ compiler create temporary variables?
class X { public: int x; static void f(int z); }; void X::f(int y) {x=y;} What is the error in the sample code above? a) The class X does not have any protected members. b) The static member function f() accesses the non-static z. c) The static member function f() accesses the non-static x. d) The member function f() must return a value. e) The class X does not have any private members.
in C++ , the word plus plus who found this?
What is the use of string in c++?
what is the order of initialization for data?
10 Answers Amazon, TCS, Wipro,
Out of fgets() and gets() which function is safe to use?
What is an Iterator class?
Give a very good method to count the number of ones in a "n" (e.g. 32) bit number.
What are the advantages of using a pointer? Define the operators that can be used with a pointer.
why is iostream::eof inside a loop condition considered wrong?
A company pays its salespeople on a commission basis. The salespeople receive $200 per week plus 9 percent of their gross sales for that week. For example, a saleperson who sells $5000 worth of merchandise in a week receives $200 plus 9 percent of $5000, or a total of $650. You have been supplied with a list of items sold by each salesperson. The values of these items are as follows: Item Value A 239.99 B 129.75 C 99.95 D 350.89 Write a program that inputs one salesperson's items sold in a week (how many of item A? of item B? etc.) and calculates and displays that salesperson's earnings for that week.