logo

Crowdly

Browser

Add to Chrome

Objektno orijentirano programiranje (111/112/114/120)

Looking for Objektno orijentirano programiranje (111/112/114/120) test answers and solutions? Browse our comprehensive collection of verified answers for Objektno orijentirano programiranje (111/112/114/120) at moodle.srce.hr.

Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!

Napišite ispis sljedećeg programa:

 

#include<iostream>

using namespace std;

int a = 10;

void funkcija() { cout << a; }

int main() { int a = 17; cout << a; funkcija(); return 0; }

View this question

Što će biti ispisano nakon izvršenja programa:

#include<iostream>

using namespace std;

int A(int x) { return 3 * x; }

void B(int x, int& y) { y = A(x) + 3; }

int main() {

  int a = 3, b = 0, c;

  a = A(b); cout << a;

  B(a, b); cout << b;

  B(a, c); cout << c;

  return 0;

}

View this question

Zadana je klasa:

class Tocka {

  public:                    

    double x, y;

    Tocka();

    double UdaljenostOdIshodista();

    void IspisiAdresu();

};

Funkcija IspisiAdresu() treba ispisati adresu objekta klase Tocka za koji je pozvana. Ispravna implementacija je:

0%
0%
0%
0%
View this question

Što će se dogoditi prilikom pokretanja slijedećeg programa:

 

#include <iostream>

using namespace std;

int main() {

  int x = 0;

  int& ref = 5;

  cout << ref;

  return 0;

}

View this question

Want instant access to all verified answers on moodle.srce.hr?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome