Programming Language Syntax
If the variable name is 'age' and the programmer wants to input age, which is the correct syntax?
Answer: cin>>age;
Explanation
cin >> age; is the correct syntax in C++ to take input from the user and store it in the variable age.
The >> operator is used with cin to extract the input value into the variable.
This question appeared in
Past Papers (6 times)
ETEA 25 Years Past Papers Subject Wise (Solved) (2 times)
KPK Teacher Past Papers SST PST CT TT PET (2 times)
Secondary School Teacher SST Past Papers, Syllabus, Jobs (2 times)
This question appeared in
Subjects (1 times)
COMPUTER (1 times)
Related MCQs
- Which of the following is correct syntax in Excel?
- What is the correct syntax to access the value at address ptr in C, where ptr is a pointer?
- Which of the following is correct syntax for defining Mathematical constant PI using preprocessor directive in C language?
- What is the correct HTML code to create a checkbox input field?
- The effect of independent variable on dependent variable is studied in?
- The dependence of a variable on two or more than two independent variable, the relation is said to be _____?
- If a variable 'y' depends upon a variable 'x' in such a way that each value of 'x' determines exactly one value of 'y', then we say that
- A programmer is a _____?
- PHP syntax is closed with
- Functions defined by the programmer are known as _____?