Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

Typing on the screen contents of a variable char s = "this is only a test" will be done in C ++ using statement:

Typing on the screen contents of a variable char s = "this is only a test" will be done in C ++ using statement:A. cin << sB. cout >> sC. cout << sD. cin >> s

user-image
Question added by Tomasz Modrzejewski , Python Developer , Freelancer
Date Posted: 2015/04/18
Ahmed Maher allam
by Ahmed Maher allam , Senior IT Consultant , CBK - G&D - AXIS-olutions

c. cout <<  s , is the correct answer

Yogesh Dhakad
by Yogesh Dhakad , Director Technical , Timeless Horizon Engineering Solutions

The correct answer is;

C. cout << s

Remember;

- you always "give" to cout (hence cout << aVariable;)

- you always "take" from cin (hence cin >> aVariable;)

Abdul Khader Shaik
by Abdul Khader Shaik , IT & Ops Manager , TheSmartlabs

Hey Tomasz Modrzejewski...!!

Are you alright..??

How can you forget this basic thing..

هاشم المشارقة
by هاشم المشارقة , Key Account Manager , Advanced United Systems Ltd. ( A member of Taj Holding Group)

The right choice is C.

cout << s ;

Tomasz Modrzejewski
by Tomasz Modrzejewski , Python Developer , Freelancer

yes C / how did you know ? Do you can prove it?

More Questions Like This