In C++, the extraction operator (>>) is used with the cin object to take input from the user through the keyboard. For example, cin >> age; reads the user's input and stores it in the variable age. The >> operator extracts data from the input stream and assigns it to the specified variable. It is commonly used for reading integers, floating-point values, characters, strings, and other supported data types.
Which operator is used to take input from the user in C++?
Review the verified answer and explanation for this ETEA Educational Testing and Evaluation Agency past-paper question on CampusFin.
Question context
This question is part of ⚙️ C++ Programming within the broader 💻 Programming subject and appears in the ETEA Educational Testing and Evaluation Agency preparation collection. Reviewing the answer together with nearby questions helps reinforce the underlying concept and identify how it may appear in competitive exams.