stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
CONCEPTS IN C++ extended #2 Flashcards | StudBud
Explore
/
CONCEPTS IN C++ extended #2
CONCEPTS IN C++ extended #2
11 terms
·
StudBud Administration
·
23 plays
BASIC CONCEPTS #cpp #programming
Flashcards
11 cards
F
Practice quiz
P
Host live
L
Questions
11
Answers
1
/*! \brief header to create Complex */
is useless
is a standard Doxygen comment
is not a valid C++ comment
is not compiling
2
operator double() { return (this->conjugate()); }
is an implicit cast into a double
is an explicit conversion into a double
is not linking
is not compiling
3
One constructor is wrong...
Complex(double real = 0, double img)
Complex(double real = 0.0 , double img = 0.0)
Complex(double real , double img = 0.0)
Complex(double real = 0.0 , double img )
4
mythread.join()
starts the thread mythread
ends the thread mythread
blocks the execution of the thread that calls this function
returns whether the thread mythread is joinable
5
When do you lock your mutex...
before pop
after push
before push
after pop
6
friend int f(int a, int b) grants function f access to...(of the class where the it appears)
public and protected members
only public members
only private members
private, protected and public members
7
the wrong one is... ?
int *pa = new int;
int *pa=NULL;
int *pa = new int[10];
int *pa= &pb;
8
The exercice about threads of FIFO<Complex> was...
really too much (over 10h work)
sort of easy
super hard (6h+ work)
hard (over 4h work)
9
Which data type can be used to hold a wide character in C++?
long
none of those
wchar_t
unsigned char
10
best signature is...
Complex operator+ (const Complex &c) const;
Complex operator+ (const Complex &c);
const Complex operator+ (const Complex &c) const;
Complex operator+ (Complex &c) const;
11
char s[]="hie", t[]="hie"; if(s==t) cout<<"equal";
this program has no output
this program outputs unequal strings
this program outputs equal strings
this program does not compile