If the variable name is 'age' and the programmer wants to input age, which is the correct syntax?
- cin(age)
- cin<<age;
- cin>>age;
- None of these
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.
Related MCQs
آپریٹنگ سسٹم کیا ہوتا ہے؟
- Personal software
- System software
- Application software
- None of these
اس سوال کو وضاحت کے ساتھ پڑھیں
دوسری نسل کے کمپیوٹر میں مندرجہ ذیل میں سے کون سی ٹیکنالوجیز استعمال ہوئی؟
- Vacum Tubes
- Transistors
- Integrated circuits
- None of these
اس سوال کو وضاحت کے ساتھ پڑھیں
کون سی میموری سب سے تیز ہوتی ہے اور عام طور پر سی پی یو کے اندر موجود ہوتی ہے؟
- Main Memory
- SRAM
- Cache Memory
- DRAM
اس سوال کو وضاحت کے ساتھ پڑھیں
مندرجہ ذیل میں سے کون سا نان وولیٹائل اسٹوریج ڈیوائس ہے جو بجلی بند ہونے کے بعد بھی ڈیٹا محفوظ رکھتا ہے؟
- ROM
- RAM
- CPU
- None of these
اس سوال کو وضاحت کے ساتھ پڑھیں
مندرجہ ذیل میں سے کون سی غیر مستحکم میموری ہے؟
- RAM
- ROM
- Cache
- Both A and C