MESSAGE
DATE | 2011-06-02 |
FROM | Ruben Safir
|
SUBJECT | Re: [NYLXS - HANGOUT] C++ Workshop
|
From owner-hangout-outgoing-at-mrbrklyn.com Thu Jun 2 19:24:56 2011 Return-Path: X-Original-To: archive-at-mrbrklyn.com Delivered-To: archive-at-mrbrklyn.com Received: by www2.mrbrklyn.com (Postfix) id A15BFFFAC2; Thu, 2 Jun 2011 19:24:56 -0400 (EDT) Delivered-To: hangout-outgoing-at-www2.mrbrklyn.com Received: by www2.mrbrklyn.com (Postfix, from userid 28) id 90447100B11; Thu, 2 Jun 2011 19:24:56 -0400 (EDT) Delivered-To: hangout-at-mrbrklyn.com Received: from mailbackend.panix.com (mailbackend.panix.com [166.84.1.89]) by www2.mrbrklyn.com (Postfix) with ESMTP id DEE2AFFAC2 for ; Thu, 2 Jun 2011 19:24:55 -0400 (EDT) Received: from [10.0.0.24] (www2.mrbrklyn.com [96.57.23.82]) by mailbackend.panix.com (Postfix) with ESMTP id E9363328C9 for ; Thu, 2 Jun 2011 19:24:58 -0400 (EDT) Message-ID: <4DE81BC9.6080105-at-panix.com> Date: Thu, 02 Jun 2011 19:24:57 -0400 From: Ruben Safir User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110414 SUSE/3.1.10 Thunderbird/3.1.10 MIME-Version: 1.0 To: hangout-at-mrbrklyn.com Subject: Re: [NYLXS - HANGOUT] C++ Workshop References: <20110601004109.GA21425-at-panix.com> In-Reply-To: <20110601004109.GA21425-at-panix.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-hangout-at-mrbrklyn.com Precedence: bulk Reply-To: hangout-at-mrbrklyn.com
Eh I just took an examination for a Bloomberg job, and I'll tell you, I'm so frustrated with myself. The examine didn't cover anything particularly advanced, but it hammered on a bunch of stuff that are like puzzles needing sure knowledge of operator precedence, and type casting. The C++ end had a lot of questions on "virtual", something I'm just not familiar with yet, const and static values.
I felt like such an idiot.
Ruben
On 05/31/2011 08:41 PM, Ruben Safir wrote: > OK - > > I phave a puzzle for the workshop. > > explain this code and it's output > > #include > #include > > > int main(int argv, char ** argc){ > > char x = 'm'; > float a = 3.14, b = 9.3453, e = 3, f = 1/3; > f = (1.0 / 3); > short c = 6; > std::cerr.write( "x = ", 4); > std::cerr.put(x); > std::cerr.put( '\n'); > std::cerr<< "x = "<< x<< std::endl; > std::cout<< "a + b + c = "<< std::scientific<< a + b + c<< " > hello World"<< std::endl; > std::cout<< "a + b + c = "<< std::fixed<< a + b + c<< std::endl; > std::cout<< "e * f = "<< e<< " * "<< f<< "="<< e * f<< > std::endl; > ((std::cout.write("x= ", 3)).operator<<(x)).operator<<(std::endl); > ((std::cout.operator<<("x= ")).operator<<(x)).operator<<(std::endl); > std::cout<< "x = "<< x<< std::endl; > } >
|
|