1.
Објектите:
Correct Answer
A. имаат два атрибути: податоци и функции членки
Explanation
The correct answer states that objects have two attributes: data and member functions. This means that objects in programming languages have both data, which represents the state or characteristics of the object, and member functions, which define the behavior or actions that the object can perform. These attributes are essential for objects to encapsulate data and functionality into a single entity, allowing for modular and reusable code. Additionally, the answer implies that objects are created immediately upon the creation of a class, and they can only be accessed or invoked by other objects.
2.
Дефинирањето
(создавањето)
на објекти
се извршува
во:
Correct Answer
D. во било која функција, која може да биде необјектна или функција членка на некој објект
Explanation
The definition (creation) of objects can be performed in any function that can be either non-member or a member function of an object. This means that objects can be created and defined in any function, regardless of whether it is a member function of a specific object or not. The objects can be created and defined in any function that has a reference to the corresponding object. Therefore, the correct answer is "во било која функција, која може да биде необјектна или функција членка на некој објект" (in any function, which can be non-member or a member function of some object).
3.
Доколку
сакаме да ги
направиме
членките на
класата
јавни
(достапни и
од надвор од
класата)
тогаш треба:
Correct Answer
A. пред нивното декларирање на стои клучниот збор public
Explanation
In order to make the members of a class public (accessible from outside the class), the keyword "public" should be placed before their declaration.
4.
Кога
се дефинира
класа:
Correct Answer(s)
A. таа може да содржи јавни податочни членки
B. таа може да содржи приватни податочни членки
Explanation
When a class is defined, it can contain public data members and private data members.
5.
Пристап
до
функциските
членки се
врши со:
Correct Answer
A. преку операторот за достап "."
Explanation
The correct answer is "преку операторот за достап "." (through the dot operator)". This means that access to function members is done by using the dot operator in the programming language. The dot operator is used to access the functions or members of an object.
6.
Пристапот
до
податочните
членки на
класа се
извршува:
Correct Answer
A. преку операторот за достап "."
Explanation
The correct answer is "преку операторот за достап "." (through the dot operator)". This means that access to the data members of a class is performed using the dot operator in the given programming language.
7.
Јавните
членки се
достапни:
Correct Answer(s)
A. од другите членки на класата
E. од било кој дел од програмата
Explanation
The correct answer is "од другите членки на класата, од било кој дел од програмата". This means that the public members of a class can be accessed by other members of the same class as well as from any part of the program.
8.
Кога
се дефинира
класа:
Correct Answer
C. се препорачува да содржи приватни податочни членки
Explanation
When defining a class, it is recommended to include private data members. This is because private data members cannot be accessed or modified directly from outside the class, providing encapsulation and data hiding. By keeping the data members private, we can control their access and ensure that they are only modified through the class's public member functions, maintaining the integrity and consistency of the class's data.
9.
Класа
е
Correct Answer
D. е апстрактен тип со кој се создава множество на објекти кои делат (поседуваат) заедничко однесување и структура
Explanation
The correct answer is that a class is an abstract type that creates a collection of objects that share common behavior and structure.
10.
Сите
функциски членки
мора да
бидат:
Correct Answer
C. може да има и јавни и приватни функциски членки
Explanation
The correct answer is that the function members can be both public and private.
11.
За да
имаме полиморфизам треба да имаме
Correct Answer(s)
A. референцна променлива од суперкласа
D. објект од суперкласа
Explanation
To achieve polymorphism, we need a reference variable of the superclass and an object of the superclass. This is because polymorphism allows us to treat objects of different classes as objects of the same superclass, allowing us to use the same methods and behaviors defined in the superclass. By having a reference variable of the superclass and an object of the superclass, we can dynamically bind the appropriate method implementation at runtime based on the actual object type.
12.
Да се
означи кои од наведените се особини на класните конструктори:
Correct Answer(s)
A. името им е исто со името на класата
B. се функции што се извршуваат автоматски при креирање на инстанца од класата
Explanation
Class constructors are special functions that are automatically executed when an instance of a class is created. They have the same name as the class and do not have a return type. Therefore, the given answer correctly states that the characteristics of class constructors include having the same name as the class and being functions that are automatically executed when an instance of the class is created.
13.
До
приватен член на класа се пристапува
Correct Answer(s)
B. со функција од приватниот дел на класата
C. со функција членка на класата
Explanation
A private member of a class can be accessed with a function from the private part of the class or with a member function of the class.
14.
До јавен
член на класа се пристапува
Correct Answer
B. од функција во која е креиран објект на класата
Explanation
The correct answer is "from a function in which an object of the class is created". This means that a public member of a class can be accessed from any function in the program, but specifically from a function where an object of the class is created. In other words, once an object of the class is created, its public members can be accessed from any function within the program.
15.
При
инстанцирање на објект од некоја класа
Correct Answer
B. само податоците
Explanation
When an object is instantiated from a class, all the data of the object is created. This means that the object will have all the variables and their corresponding values. However, the methods of the object are not created during instantiation. Methods are defined in the class and can be accessed by the object, but they are not created again for each individual object.
16.
Името на
функција – членка на некоја класа не може да биде исто со името на
класата.
Correct Answer
A. неточно
Explanation
The statement is incorrect because the name of a member function in a class can be the same as the name of the class. This is known as a constructor, which is a special member function that has the same name as the class and is used to initialize objects of that class.
17.
Основната
задача на конструкторите на класата е:
Correct Answer
A. иницијализација на податочните членки од класата
Explanation
The main task of class constructors is to initialize the data members of the class. They are responsible for setting the initial values of the variables within the class. This ensures that the object created from the class starts with the desired state and can be used correctly. Constructors are called automatically when an object is created, and they can have parameters to allow for different initialization values. The other options listed, such as dynamic memory allocation and encapsulation of variables, are not the main tasks of class constructors.
18.
Објектите се:
Correct Answer
B. инстанци на класи
Explanation
The correct answer is "инстанци на класи". This means that objects are instances of classes. In object-oriented programming, a class is a blueprint for creating objects. When we create a new object, we are creating an instance of that class. Therefore, objects are instances of classes.
19.
Кога се
дефинира класа, ако на почеток не се наведе каков достап има до
членките:
Correct Answer
B. членките што следат се приватни
Explanation
When a class is defined and the access level of its members is not specified, the default access level is private.
20.
Објектите:
Correct Answer
A. имаат два атрибути: податоци и функции членки
Explanation
The correct answer states that objects have two attributes: data and member functions. This means that objects in this context have both data, which represents the state or characteristics of the object, and member functions, which are the actions or behaviors that the object can perform. These attributes are essential for objects to interact with each other and manipulate their own data. Additionally, the answer implies that objects are created immediately when the class is created and can only be called by other objects. It also suggests that objects can only be created within their own class.
21.
Кога се
дефинира класа:
Correct Answer(s)
A. таа може да содржи јавни податочни членки
B. таа може да содржи приватни податочни членки
Explanation
When defining a class, it can contain both public and private data members. Public data members can be accessed and modified by any part of the program, while private data members can only be accessed and modified within the class itself. Therefore, the correct answer states that a class can contain both public and private data members.
22.
Класниот конструктор кај
локалните објекти:
Correct Answer
A. се повикува секогаш кога се извршува декларациска наредба
Explanation
The correct answer is "It is called every time a declaration statement is executed." This means that the class constructor is invoked every time a declaration statement is executed in the program.
23.
Апстрактна
класа е класа
Correct Answer(s)
C. која се дефинира со клучниот збор abstract
D. од која можеме да искористиме референцна променлива
Explanation
The correct answer is "која се дефинира со клучниот збор abstract, од која можеме да искористиме референцна променлива" because it accurately describes an abstract class. An abstract class is a class that contains abstract methods, can be instantiated, is defined with the keyword "abstract," and can be used with a reference variable.
24.
Да се означи кои од
наведените се особини на класните
конструктори:
Correct Answer
A. се функции што не враќаат вредности
Explanation
The correct answer is "се функции што не враќаат вредности" which means "are functions that do not return values". This means that class constructors are functions that are used to initialize objects of a class, but they do not return any values. They are typically used to set initial values for the member variables of the class.
25.
При структурно програмирање
Correct Answer(s)
A. проблемот се дели на поедноставни проблеми
C. се користи модуларно програмирање
Explanation
In structural programming, the problem is divided into simpler problems and modular programming is used. This approach allows for breaking down complex problems into smaller, more manageable parts, making it easier to solve them. By dividing the problem into simpler problems, it becomes easier to understand and solve each part individually. Modular programming further enhances this approach by allowing for the creation of reusable modules or functions that can be used to solve different parts of the problem. This promotes code reusability, maintainability, and improves overall program structure.
26.
Објектите во ООП
Correct Answer(s)
A. имаат свои податоци
B. имаат свое однесување
Explanation
The correct answer is "имаат свои податоци, имаат свое однесување" because objects in Object-Oriented Programming (OOP) have their own data, which is represented by attributes or properties, and they also have their own behavior, which is represented by methods or functions. This is one of the fundamental principles of OOP, where objects encapsulate both data and behavior, allowing for modular and reusable code.
27.
Во ООП објектите
Correct Answer(s)
A. имаат свои атрибути
C. може да се прошируваат
Explanation
In object-oriented programming, objects have their own attributes and can be extended. This means that objects can have characteristics or properties that define their state, and they can also be expanded or modified to include additional attributes or behaviors. This allows for flexibility and customization in designing and implementing object-oriented systems.
28.
Објектот
може да има
Correct Answer(s)
A. атрибути
D. однесување
Explanation
The object can have attributes and behavior.
29.
Карактеристики
на објектно ориентирани јазици се
Correct Answer(s)
B. може да решат проблеми при правење на големи проекти
C. делење на програмата на програмски сегменти
E. полесно одржување на програмите исправни
Explanation
The characteristics of object-oriented languages include the ability to solve problems when building large projects, dividing the program into program segments, and easier maintenance of correct programs.
30.
Модификацијата на
постоечките програми е овозможена од следните концепти на објектно
ориентираните јазици:
Correct Answer(s)
A. полиморфизам
B. наследување
Explanation
The modification of existing programs is made possible by the concepts of polymorphism and inheritance in object-oriented languages. Polymorphism allows objects of different types to be treated as objects of a common type, which makes it easier to modify and extend the functionality of a program. Inheritance allows new classes to be created based on existing classes, inheriting their properties and behaviors. This facilitates code reuse and makes it easier to modify and customize existing programs.
31.
Кои од следниве наредби се
наредби за декларирање
Correct Answer(s)
A. Int i;
B. char c;
D. Double d;
Explanation
The given declarations are examples of variable declarations in different data types. "int i" declares a variable named "i" of type integer, "char c" declares a variable named "c" of type character, and "double d" declares a variable named "d" of type double. These declarations are valid and follow the syntax for declaring variables in their respective data types. The declaration "real r" is not a valid declaration in most programming languages, which is why it is not included in the correct answer.
32.
Кои од следните наредби се
наредби за избор?
Correct Answer(s)
A. If
B. if – else
E. Switch
Explanation
The correct answer is if, if-else, and switch. These are all conditional statements used in programming languages to control the flow of the program based on certain conditions. The "if" statement allows the program to execute a block of code if a specified condition is true. The "if-else" statement extends the "if" statement by providing an alternative block of code to execute if the condition is false. The "switch" statement allows the program to select one of many code blocks to be executed based on the value of a variable.
33.
Наредбата
за избор ако-тогаш во C++
е
Correct Answer
B. If (uslov)
{
naredbi;
}
Explanation
The correct answer is the third option, "if (uslov) naredbi;". This is because in C++, the syntax for an if statement is "if (condition) { statements; }". The third option follows this syntax correctly by having the condition "uslov" followed by the statement "naredbi;" without any unnecessary keywords or braces.
34.
Кои од следните наредби
спаѓаат во наредби за повторување
Correct Answer(s)
A. While
D. For
Explanation
The correct answer is while and for. These are both loop control structures that allow for repetitive execution of a block of code. The while loop continues executing as long as a certain condition is true, while the for loop specifies a specific number of iterations to be executed. Switch and repeat-until are not loop control structures, but rather conditional and iterative structures respectively.
35.
Кај наредбата while условот
се испитува
Correct Answer(s)
A. на почетокот на првиот циклус
B. на почетокот на секој циклус
Explanation
The condition in a while loop is checked at the beginning of each cycle. This means that the condition is evaluated before the code inside the loop is executed. Therefore, the correct answer is "на почетокот на првиот циклус" and "на почетокот на секој циклус".
36.
Полиморфизмот
Correct Answer(s)
A. дозволува типот на некој објект да се одреди во време на извршување
B. се спроведува ако имаме суперкласна референцна променлива
Explanation
Polymorphism allows the type of an object to be determined at runtime. It is implemented if we have a superclass reference variable.
37.
Наредбите кои следат во
while циклусот
Correct Answer
C. не мора да се извршат ниеднаш
Explanation
The correct answer is "не мора да се извршат ниеднаш" (do not have to be executed at all). This is because the question is asking about the requirements that must be followed in a "while" loop. In a "while" loop, the code block may not be executed at all if the condition is initially false. Therefore, the correct answer is that the code block does not have to be executed at all.
38.
Наредбите кои следат во
do-while циклусот
Correct Answer
A. мора да се извршат барем еднаш
Explanation
The correct answer is "мора да се извршат барем еднаш" which means "must be executed at least once". This is because a do-while loop is a type of loop where the condition is checked at the end of the loop. This means that the statements inside the loop will always be executed at least once, even if the condition is initially false.
39.
Извршувањето на наредбите
во do-while циклусот се одвива сé додека
Correct Answer
A. е исполнет условот после while
Explanation
The correct answer is "е исполнет условот после while" (the condition after while is satisfied). In a do-while loop, the code block is executed at least once before checking the condition. If the condition after while is satisfied, the loop will continue executing. If the condition is not satisfied, the loop will terminate. This behavior is similar to the repeat-until loop in Pascal.
40.
При повикување на функција
Correct Answer(s)
A. ако бројот на вистинските аргументи е различен од бројот на формалните, се јавува порака за грешка
D. стварните аргументи може да бидат променливи
Explanation
The correct answer states that if the number of actual arguments is different from the number of formal arguments, an error message will be displayed. It also states that the actual arguments can be variables. This means that if the function is called with a different number of arguments than expected, an error will occur. Additionally, the actual arguments can be variables, allowing for flexibility in the values passed to the function.
41.
Кои од следниве искази се точни
Correct Answer(s)
B. дефиниција е декларација кога на името на објектот му се дава и вредност
C. подрачје на важење е множество на програмски код каде објектот може да се користи
Explanation
The correct answer is that a definition is a declaration when a value is given to the object's name, and a scope is a set of program code where the object can be used.
42.
Декларацијата
на некој интерфејс ...
Correct Answer
A. содржи потпис
Explanation
The correct answer is "содржи потпис" (contains a signature). In object-oriented programming, an interface declaration defines a contract that a class must adhere to. It specifies the methods that the class must implement, but it does not provide the actual implementation of those methods. Therefore, an interface declaration only includes the signatures of the methods, not their actual implementation.
43.
Објектите на класите
Correct Answer(s)
B. може да се користат како аргументи на функции
C. може да се вратат како резултат на функција
Explanation
The correct answer is "може да се користат како аргументи на функции" and "може да се вратат како резултат на функција". This means that objects of classes can be used as arguments in functions and can also be returned as results from functions.
44.
Функцијата членка на класата
Correct Answer(s)
A. е во областа на важење на класата ако е дефинирана во самата класа
C. може во својата дефиниција да користи јавни членови на класата
D. може во својата дефиниција да користи приватни членови на класата
Explanation
The correct answer is that a member function of a class is in the scope of the class if it is defined within the class itself. It can use both public and private members of the class. Additionally, it can access the members of its class using the dot operator.
45.
Статичките членови на класата
Correct Answer(s)
A. можат да се податоци
B. можат да се функции
D. имаат само 1 копија во меморија без разлика колку пати се повикуваат
Explanation
The correct answer is that static members of a class can be data, can be functions, and have only one copy in memory regardless of how many times they are invoked.
46.
Статичките податоци членови на класите
Correct Answer
B. може да се од било кој тип
Explanation
The correct answer is "може да се од било кој тип" (can be of any type). This means that static data members in a class can be initialized with values of any data type. Additionally, these static data members can only be accessed by the member functions of the class using the access operators.
47.
Статичкиот податочен член на класата
Correct Answer(s)
A. има само 1 копија во меморија без разлика колку пати се референцира при извршувањето на програмата
C. може да е аргумент на функција членка на класата
Explanation
The static data member of a class has only one copy in memory regardless of how many times it is referenced during the program execution. It can also be an argument of a member function of the class.
48.
Статичките функции членки на некоја класа
Correct Answer(s)
A. во својата декларација го користат зборот static
C. може да се повикаат за било кој објект член на таа класа
D. можат да се повикаат со операторот .
E. можат да се повикаат со наведување на која класа припаѓаат
Explanation
Static member functions in a class are declared using the keyword "static" and can be invoked without creating an object of that class. They can be called for any object member of that class, using the dot operator. Additionally, they can also be called by specifying the class to which they belong.
49.
Наследување
е
Correct Answer
B. релација помеѓу класите
Explanation
The correct answer is "релација помеѓу класите" which translates to "a relationship between classes" in English. In object-oriented programming, inheritance is a mechanism that allows a class to inherit properties and methods from another class. This relationship between classes is important for code organization, reusability, and creating hierarchies of related classes.
50.
Класата
B ја наследува класата A ако
Correct Answer
A. објектите од класата B ги имаат сите карактеристики на објектите од класата A и уште некои нивни посебни карактеристики
Explanation
The correct answer states that class B inherits class A if objects of class B have all the characteristics of objects of class A and some additional specific characteristics. This means that class B can access and use all the attributes and methods of class A, and can also have its own unique attributes and methods. Inheritance allows for code reuse and promotes a hierarchical organization of classes.