answersLogoWhite

0

cin is an object........ An Example is // By Codex

#include <iostream> using namespace std; int main(){ int age;

cout << "How Old Are You?\n";

cin >> age;

cout << "You are << age << years old\n";

system("pause")

return 0;

}

User Avatar

Wiki User

17y ago

What else can I help you with?

Related Questions

What is difference between scanf and cin?

scanf is a function (available in C and C++)cin is an istream object (C++ only)Advice: when in doubt, use fgets+sscanf


What is CIN?

cin is the object of istream class i.e, input class.


Input output function in c plus plus?

input is the &lt;&lt; operator and output is the &gt;&gt; operator


Is cin an output identifier in c plus plus?

No. In C++ with &lt;iostream&gt;, cin is a prefedined class that represents stdin, so it is an input identifier.


Which operator require to call c function using object name?

The operator required to call c function using object name is function object. Other operator names that deal with objects are structure dereference, structure reference, and indirection


Why Cin and Cout cannot be used outside the main function?

You are completely wrong here.Another answer:There is nothing to say you cannot use cin or coutoutside the main() function (for example, you can use them in a function called from main()). However, using them before main() has been called (e.g. in the constructor of a static object) can have disastrous consequences: cin and cout are themselves static objects, and static initialisation order is undefined. Thus you could be calling them before they have been properly constructed.


Which function reads character into an array specified bt its parameter in c plus plus?

void foo (char&amp; c) { cin &gt;&gt; c; } int main() { char ch[10] {}; for (size_t c=0; c!=10; ++c) foo (c[0]); }


What is the function of the cin and cout statements?

cin and cout are synonymous with stdin and stdout, implementing console input and output respectively.


What do you call an object function in c plus plus?

method


Can you declare an object inside static number function in c?

No, because there are no objects in C.


What is a call by reference?

In C++ (C Plus Plus), when you call by reference, you are directly accessing the data of the referenced object. When you pass an object to a function by reference, any and all alterations to the object made within the function carry through to the actual object.


What is calling by reference?

In C++ (C Plus Plus), when you call by reference, you are directly accessing the data of the referenced object. When you pass an object to a function by reference, any and all alterations to the object made within the function carry through to the actual object.