Search Header Logo

Συνθήκες

Authored by Miltiadis Katarachias

Computers

1st Grade

Used 6+ times

Συνθήκες
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

8 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

15 mins • 1 pt

  1. 1. Ποιο είναι το αποτέλεσμα του παρακάτω προγράμματος;

    1. int i = 10;

      while (i > 0) {

      printf("%d ", i);

      i -= 3;

    2. }

10 9 8 7 6 5 4 3 2 1

10 7 4 1

10 7 4

10 9 8 7

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

  1. 2. Ποια είναι η έξοδος του παρακάτω προγράμματος;

  2. int i;

  3. for (i = 0; i < 10; i += 2) {

  4. if (i == 6) {

  5. break; }

  6. printf("%d ", i); }

0 2 4 6 8

0 2 4

0 2 4 6

0 2 4 8

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

  1. 3. Ποιο θα είναι το αποτέλεσμα του παρακάτω προγράμματος;

int i = 1, count = 0;

while (i <= 10) {

if (i % 3 == 0 || i % 4 == 0) {

count++; }

i++; }

printf("Count = %d\n", count);

Count = 5

Count = 4

Count = 2

Count = 6

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

  1. 4. Ποιο θα είναι το αποτέλεσμα του παρακάτω προγράμματος;

  2. for (int i = 0; i < 5; i++) {

  3. for (int j = i; j < 5; j++) {

  4. printf("*"); }

  5. printf("\n"); }

*****

****

***

**

  • *

  • *

  • **

  • ***

  • ****

  • *****

*****

*****

*****

*****

*****

Κανένα από τα παραπάνω.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

  1. 5. Τι εκτυπώνει το παρακάτω πρόγραμμα;

  2. int i = 0, sum = 0;

    while (i++ < 5) {

  3. sum += (i % 2 == 0); }

1

6

3

2

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

  1. 6. Είναι ο παρακάτω κώδικας γραμμένος σωστά για τον έλεγχο της εισαγωγής τιμής?

  2. int i = 0;

  3. printf("Please give a number between 1-10: ");

  4. do{

  5. scanf("%d", &i);

  6. if (i < 1 || i > 10) {

  7. printf("Invalid input. Please try again: "); }

  8. }while(i > 10 && i < 1);

ΣΩΣΤΌ

ΛΑΘΟΣ

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

  1. 7. Ποιο είναι το αποτέλεσμα της παρακάτω έκφρασης αν c = 5;

  2. ( c == 5 && !( c > 10 ) ) | | ( c < 3 )

5

1

0

Σφάλμα μεταγλώττισης

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?