TQ-Array operations on functions

TQ-Array operations on functions

University

20 Qs

quiz-placeholder

Similar activities

Hashing

Hashing

University

20 Qs

C - Structures

C - Structures

University

20 Qs

JAVA FINAL QUIZ FOR ASSESSMENT

JAVA FINAL QUIZ FOR ASSESSMENT

University

15 Qs

Lập trình C++

Lập trình C++

University

18 Qs

Kuis Dadakan ;)

Kuis Dadakan ;)

10th Grade - University

15 Qs

קלט פלט משתנים והוראות השמה

קלט פלט משתנים והוראות השמה

7th Grade - University

20 Qs

Revisão 2ª AV - Sistemas Operacionais

Revisão 2ª AV - Sistemas Operacionais

University

20 Qs

Pythonintro

Pythonintro

University

15 Qs

TQ-Array operations on functions

TQ-Array operations on functions

Assessment

Quiz

Computers

University

Practice Problem

Hard

Created by

KarunaiMuthu SriRam

Used 1+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

1

2

3

Compiler Error

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code?

 

#include <stdio.h>

void modify(int arr[]) {

    arr[1] = 5;

}

 

int main() {

    int a[] = {1, 2, 3};

    modify(a);

    printf("%d", a[1]);

    return 0;

}

1

2

3

5

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code?

 

#include <stdio.h>

void change(int *arr) {

    arr[2] = 10;

}

 

int main() {

    int a[] = {1, 2, 3};

    change(a);

    printf("%d", a[2]);

    return 0;

}

1

2

3

10

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code?

 

#include <stdio.h>

void update(int *a) {

    a++;

    *a = 7;

}

 

int main() {

    int arr[] = {3, 4, 5};

    update(arr);

    printf("%d", arr[1]);

    return 0;

}

3

4

7

Undefined

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code?

 

#include <stdio.h>

void process(int *arr) {

    arr[0] = 6;

}

 

int main() {

    int a[] = {4, 5, 6};

    process(a);

    printf("%d", a[0]);

    return 0;

}

4

5

6

Compiler Error

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code?

 

#include <stdio.h>

void arrayFunc(int arr[]) {

    arr[0] = 8;

}

 

int main() {

    int a[] = {2, 3, 4};

    arrayFunc(a);

    printf("%d", a[0]);

    return 0;

}

2

3

4

8

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code?

 

#include <stdio.h>

void modifyArray(int *arr) {

    arr++;

    *arr = 9;

}

 

int main() {

    int a[] = {5, 6, 7};

    modifyArray(a);

    printf("%d", a[1]);

    return 0;

}

5

6

7

9

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?

Discover more resources for Computers