<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>www.it-pruefungen.ch Prüfungsvorbereitung Prüfungsfragen &#187; CPP Prüfungsvorbereitung</title>
	<atom:link href="http://www.pruefungsfrage.ch/tag/cpp-prufungsvorbereitung/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.pruefungsfrage.ch</link>
	<description>originale und aktuelle Prüfungsunterlagen</description>
	<lastBuildDate>Wed, 27 May 2026 09:24:57 +0000</lastBuildDate>
	<language>de-DE</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.2</generator>
		<item>
		<title>IT-Prüfungen Exam CPP  Schulungsunterlagen</title>
		<link>https://www.pruefungsfrage.ch/2018/08/28/it-prufungen-exam-cpp-schulungsunterlagen/</link>
		<comments>https://www.pruefungsfrage.ch/2018/08/28/it-prufungen-exam-cpp-schulungsunterlagen/#comments</comments>
		<pubDate>Tue, 28 Aug 2018 12:40:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[C++ Institute]]></category>
		<category><![CDATA[CPP Prüfungsfragen]]></category>
		<category><![CDATA[CPP Prüfungsvorbereitung]]></category>
		<category><![CDATA[CPP zertifizierung]]></category>

		<guid isPermaLink="false">https://www.pruefungsfrage.ch/?p=111</guid>
		<description><![CDATA[IT-Prüfungen Exam CPP  Schulungsunterlagen www.it-pruefungen.ch C++ Certified Professional Programmer QUESTION NO: 1 What happens when you attempt to compile and run the following code? #include #include #include using namespace std; int main(){int t[] ={ 3, 4, 2, 1, 6, 5, 7, 9, &#8230; <a href="https://www.pruefungsfrage.ch/2018/08/28/it-prufungen-exam-cpp-schulungsunterlagen/">Weiterlesen <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="https://www.it-pruefungen.de/CPP.htm">IT-Prüfungen Exam CPP  Schulungsunterlagen</a> www.it-pruefungen.ch C++ Certified Professional Programmer</p>
<p>QUESTION NO: 1</p>
<p>What happens when you attempt to compile and run the following code?</p>
<p>#include</p>
<p>#include</p>
<p>#include</p>
<p>using namespace std;</p>
<p>int main(){int t[] ={ 3, 4, 2, 1, 6, 5, 7, 9, 8, 0 };</p>
<p>vectorv(t, t+10);</p>
<p>multisets1(v.begin(),v.end());</p>
<p>s1.insert(v.begin(),v.end());</p>
<p>pair&lt;multiset::iterator,multiset::iterator&gt; range;</p>
<p>range = s1.equal_range(6);</p>
<p>while (range.first != range.second) {cout&lt;&lt;*range.first&lt;&lt;&#8221; &#8220;; range.first++;}return 0;}</p>
<p>A. program outputs: 6 6<br />
B. program outputs: 5 7<br />
C. program outputs: 5 5 6 6 7 7<br />
D. program outputs: 5 5 7 7<br />
E. program outputs: 1 1 6 6 5 5</p>
<p>Answer: A</p>
<p>QUESTION NO: 2</p>
<p>What happens when you attempt to compile and run the following code?</p>
<p>#include</p>
<p>#include</p>
<p>#include</p>
<p>using namespace std;</p>
<p>templatestruct Out {ostream &amp; out;</p>
<p>Out(ostream &amp; o): out(o){}void operator()(const T &amp; val ) {out&lt;&lt;val&lt;&lt;&#8221; &#8220;;}};</p>
<p>struct Sequence {int start;Sequence(int start):start(start){}int operator()() {return start++ ; }};</p>
<p>int main() {vectorv1(10);</p>
<p>generate(v1.rbegin(), v1.rend(), Sequence(1));</p>
<p>rotate(v1.begin(),v1.begin() + 1, v1.end() );</p>
<p>for_each(v1.begin(), v1.end(), Out(cout) );cout&lt;&lt;endl;</p>
<p>return 0;}</p>
<p>Program outputs:</p>
<p>A. 1 2 3 4 5 6 7 8 9 10<br />
B. 10 9 8 7 6 5 4 3 2 1<br />
C. 9 8 7 6 5 4 3 2 1 10<br />
D. 1 10 9 8 7 6 5 4 3 2</p>
<p>Answer: C</p>
<p>QUESTION NO: 3</p>
<p>What happens when you attempt to compile and run the following code?</p>
<p>#include</p>
<p>#include</p>
<p>#include</p>
<p>#include</p>
<p>#include</p>
<p>#include</p>
<p>using namespace std;</p>
<p>class B { int val;</p>
<p>public:</p>
<p>B(int v=0):val(v){}</p>
<p>int getV() const {return val;}</p>
<p>operator int() const { return val; };};</p>
<p>templatestruct Out {</p>
<p>ostream &amp; out;</p>
<p>Out(ostream &amp; o): out(o){}</p>
<p>void operator() (const T &amp; val ) {out&lt;&lt;setw(3)&lt;&lt;hex&lt;</p>
<p>int main () {</p>
<p>int t[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};</p>
<p>fstream f(&#8220;test.out&#8221;, ios::trunc|ios::out);</p>
<p>list<strong> l(t, t+10);</strong></p>
<p>for_each(l.begin(), l.end(), Out<strong>(f));</strong></p>
<p>f.close();</p>
<p>f.open(&#8220;test.out&#8221;);</p>
<p>for( ; f.good() ; ) {</p>
<p>B i;</p>
<p>f&gt;&gt;i;</p>
<p>cout&lt;&lt;i&lt;&lt;&#8221; &#8220;;</p>
<p>}</p>
<p>f.close();</p>
<p>return 0;}</p>
<p>A. file test.out will be opened writing<br />
B. file test.out will be truncated<br />
C. file test.out will be opened for reading<br />
D. compilation error<br />
E. program will display sequence 1 2 3 4 5 6 7 8 9 10</p>
<p>Answer: D</p>
<p><a href="https://www.it-pruefungen.de/CPP.htm">CPP</a> Prüfungsfragen, CPP Examensfragen C++ Certified Professional Programmer (ICND2 v3.0) www.it-pruefungen.ch</p>
<p>QUESTION NO: 4</p>
<p>What will happen when you attempt to compile and run the code below, assuming that you enter the following sequence: one two three?</p>
<p>#include</p>
<p>#include</p>
<p>using namespace std;</p>
<p>int main ()<br />
{</p>
<p>string a;</p>
<p>cin&gt;&gt;a;</p>
<p>cout&lt;&lt;a&lt;&lt;endl;</p>
<p>return 0;}</p>
<p>Program will output:</p>
<p>A. one<br />
B. one two three<br />
C. runtime exception<br />
D. compilation error<br />
E. the result is unspecified</p>
<p>Answer: A</p>
<p>QUESTION NO: 5</p>
<p>What will happen when you attempt to compile and run the following code?</p>
<p>#include</p>
<p>#include<br />
<map></map>
<p>#include</p>
<p>#include</p>
<p>#include</p>
<p>using namespace std;</p>
<p>int main() {</p>
<p>int t[] = { 3, 4, 2, 1, 0, 3, 4, 1, 2, 0 };</p>
<p>vectorv(t, t + 10);</p>
<p>multimapm;</p>
<p>for (vector::iterator i = v.begin(); i != v.end(); i++) {</p>
<p>stringstream s;s &lt;&lt; *i &lt;&lt; *i;</p>
<p>m.insert(pair(*i, s.str()));</p>
<p>}</p>
<p>pair&lt;multimap::iterator, multimap::iterator&gt; range;</p>
<p>range = m.equal_range(2);</p>
<p>for (multimap::iterator i = range.first; i != range.second; i++) {</p>
<p>cout &lt;&lt; i?&gt;first &lt;&lt; &#8221; &#8220;;</p>
<p>}</p>
<p>return 0;</p>
<p>}</p>
<p>The output will be:</p>
<p>A. 2 2<br />
B. 1 2<br />
C. 1 3<br />
D. 2<br />
E. 0 2</p>
<p>Answer: A</p>
<p>Prüfungsvorbereitung Studienmaterial CPP deutsch C++ Certified Professional Programmer www.it-pruefungen.ch</p>
<p>QUESTION NO: 6</p>
<p>What happens when you attempt to compile and run the following code?</p>
<p>#include</p>
<p>#include</p>
<p>#include</p>
<p>using namespace std;</p>
<p>class B { int val;</p>
<p>public:</p>
<p>B(int v):val(v){}</p>
<p>int getV() const {return val;} bool operator &lt; (const B &amp; v) const { return val&gt;v.val;} };</p>
<p>ostream &amp; operator &lt;</p>
<p>templatestruct Out {</p>
<p>ostream &amp; out;</p>
<p>Out(ostream &amp; o): out(o){}</p>
<p>void operator() (const T &amp; val ) { out&lt;&lt;val&lt;&lt;&#8221; &#8220;; } };</p>
<p>int main() {</p>
<p>B t1[]={3,2,4,1,5};</p>
<p>B t2[]={5,6,8,2,1};</p>
<p>vector<strong> v1(10,0);</strong></p>
<p>sort(t1, t1+5);</p>
<p>sort(t2, t2+5);</p>
<p>set_intersection(t1,t1+5,t2,t2+5,v1.begin());</p>
<p>for_each(v1.begin(), v1.end(), Out<strong>(cout));cout&lt;&lt;endl;</strong></p>
<p>return 0;</p>
<p>}</p>
<p>Program outputs:</p>
<p>A. compilation error<br />
B. 1 2 3 4 5 6 8 0 0 0<br />
C. 1 2 3 4 5 6 8 2 1 0<br />
D. 5 2 1 0 0 0 0 0 0 0<br />
E. 1 2 5 0 0 0 0 0 0 0</p>
<p>Answer: D</p>
]]></content:encoded>
			<wfw:commentRss>https://www.pruefungsfrage.ch/2018/08/28/it-prufungen-exam-cpp-schulungsunterlagen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
