adplus-dvertising
frame-decoration

Question

What is the output of this program?
    #include <iostream>
    #include <iomanip>
    using namespace std;
    void showDate(int m, int d, int y)
    {
        cout << setfill('0');
        cout << setw(2) << m << '/'
        << setw(2) << d << '/'
        << setw(4) << y << endl;
    }
    int main()
    {
        showDate(1, 1, 2013);
        return 0;
    }

a.

1,1,2013

b.

2013

c.

01/01/2013

d.

None of the mentioned

Answer: (c).01/01/2013

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the output of this program?

Similar Questions

Discover Related MCQs

Q. What is the use of the function “showbase”?

Q. Which operator is used to insert the data into file?

Q. Which function is used to position back from the end of file object?

Q. How many objects are used for input and output to a string?

Q. Which member function is used to determine whether the stream object is currently associated with a file?

Q. Which header file is used for reading and writing to a file?

Q. Which one is always faster in writing on C++?

Q. How many tests are available in read and write operations?

Q. What will act as a intermediate between i/o operations and physical file?

Q. By using which function does the buffer are automatically flushed?

Q. How many parameters are available in the function setbuf?

Q. What is the main feature of locale in C++?

Q. Which objects information is loaded in locale object?

Q. How many categories are available in facets?

Q. What kind of locale does every program is having in C++?

Q. What will the monetary facet will do?

Q. Which header file is used with input and output operations of C in C++?

Q. Which will be used with physical devices to interact from C++ program?

Q. How many streams are automatically created when executing a program?

Q. How many indicators are available in c++?