
C++ klases (1)
Authored by Vija Vagale
Computers
University
Used 2+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
7 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Funkcija, kas neko neatgriež sākas ar
int
void
iekavām
funkcijas nosaukumu
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Funkcija, kas atgriež veselu skaitli, sākas ar
int
string
void
funkcijas nosaukumu
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
class Monkey{
string name;
int age;
public:
void setName(string n){
name = n;
}
};
Kuru variantu jāizvēlas, lai klases Monkey objektam mon piešķirtu vārdu "Sir Monkey"?
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Ko jāievieto funkcijas sākumā, lai tā strādātu pareizi?
_____ function ( ) {
string greeting = "Welcome to my game";
return greeting;
}
string
void
int
char
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
class Player{
string name;
int age;
Player(string n, int a){
name = n;
age = a;
}
};
int main(){
_________________
}
Izveidot jaunu Player objektu
player name();
Player user("John", 13);
Player user(John, "13");
Player user(name, age);
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Ko jāieraksta funkcijas sakumā?
_____ function ( int num) {
return num * 2;
}
string
void
int
char
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
class Banana{
string color;
Player(string c){
color = c;
}
};
int main(){
_________________
}
Izveidot klases Banana objektu:
banana name(color);
Banana sample("yellow", 1);
Banana sample("yellow");
Banana sample();
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?