logo

Crowdly

Browser

Add to Chrome

Programiranje II

Looking for Programiranje II test answers and solutions? Browse our comprehensive collection of verified answers for Programiranje II at ucilnica-fe.uni-lj.si.

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

Podan je naslednji program:

void test(int t[], int n) {

  for (int i = 0; i < n; i++) {

    t[i] = 0;

  }

}

int main(void){

  int tab[] = {1, 2, 3, 4, 5};

  test(&tab[3], 3);

  return 0;

}

Kakšna bo vsebina tabele tab tik pred stavkom return?

0%
0%
0%
0%
View this question

Podana je naslednja koda:

int t[] = {10, 5, 13, -4, 8};

int *p = &t[sizeof t / sizeof t[0]];

while (p != t) {

t[0] += p[-1];

p--;

}

Kakšno vrednost bo imel izraz t[0], ko se koda izvede?

100%
0%
0%
0%
View this question

Katera dva izraza vrneta naslov petega elementa tabele tab?

0%
0%
0%
0%
View this question

Deklarirani imamo kazalčni spremenljivki p in q ter tabelo t s petimi elementi Podana je naslednja koda:

p = t;

q = &t[4];

Kakšna je vrednost izraza q - p?

0%
100%
0%
0%
View this question

Podana je naslednja koda:

int vsota = 0, t[10] = {1};

for (int *k = &t[1]; *k; k++) {

  vsota += *k;

}

Kakšna bo vrednost spremenljivke vsota, ko se koda izvede?

0%
0%
0%
100%
View this question

Podan je naslednji program:

int *povecaj(int *x) {

    *x = *x + 1;

    return x;

}

int main(void) {

    int y = 0;

    y = *povecaj(&y);

    povecaj(&y);

    printf("%d", y);

    return 0;

}

Kakšna vrednost se bo izpisala na standardni izhod, ko se program izvede?

0%
0%
0%
0%
View this question

Katera od naslednjih deklaracij predstavlja kazalec na funkcijo, ki vrne kazalec na podatek tipa int in sprejme podatek tipa float?

0%
0%
0%
0%
View this question

Podana je naslednja deklaracija:

int vsota = 0, *k, t[] = {1, 2, 3, 4, 5, 0};

Katera od naslednjih kod NE sešteje vseh elementov v tabeli t?

0%
0%
0%
0%
View this question

Kakšna bo vrednost spremenljivke x, ko se izvede naslednji del kode? Predpostavimo, da je bitna dolžina podatkovnega tipa short enaka 16.

unsigned short x = 0;

for (int i = 0; i < 1000; i++) x += 200;

View this question

Podana je naslednja koda:

char znak;

char stevec = 0;

while (1) {

  scanf("%c", &znak);

  if (znak == 'q') break;

  if (isspace(znak)) stevec++;

else stevec = 0;

if (stevec > 1) continue;

  printf("%c", znak);

}

Kaj se bo izpisalo na standarden izhod, če se na vhodu pojavi besedilo "a  bc d e  fq"?

0%
0%
0%
0%
View this question

Want instant access to all verified answers on ucilnica-fe.uni-lj.si?

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

Browser

Add to Chrome