Quiz on Array

Quiz on Array

University

20 Qs

quiz-placeholder

Similar activities

Java Quiz1 @ VCE (CSE (AI&ML))

Java Quiz1 @ VCE (CSE (AI&ML))

University

15 Qs

TECHTRIX2025 BUGHUNT SET1

TECHTRIX2025 BUGHUNT SET1

University

20 Qs

DEPTH DIVE

DEPTH DIVE

University

15 Qs

Arrays

Arrays

University

15 Qs

Quiz on Object Oriented Programming and Java

Quiz on Object Oriented Programming and Java

University

15 Qs

Exploring the Basics of C Programming

Exploring the Basics of C Programming

11th Grade - University

20 Qs

SJIT ECE APTITUDE PRACTICE TEST-1@10-11-2023

SJIT ECE APTITUDE PRACTICE TEST-1@10-11-2023

University

20 Qs

Round 3: Coding Round

Round 3: Coding Round

University

24 Qs

Quiz on Array

Quiz on Array

Assessment

Quiz

Other

University

Hard

Created by

Jayasheela Kallaganiger

FREE Resource

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is Array?

Collection of different type of elements

Collectionof similar type of elements

None of the above

Both a n b

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is right way to Initialize array?

int num[6] = { 2, 4, 12, 5, 45, 5 };

int n{} = { 2, 4, 12, 5, 45, 5 };

int n{6} = { 2, 4, 12 };

int n(6) = { 2, 4, 12, 5, 45, 5 };

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Size of the array need not be specified, when

It is a declaratrion

Initialization is a part of definition

Only It is a formal parameter

All the above

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Predict the output of below code:

#include<stdio.h>

int main()

{

int a[5] = {5, 1, 15, 20, 25};

int i, j, m;

i = ++a[1];

j = a[1]++;

m = a[i++];

printf("%d, %d, %d", i, j, m);

return 0;

}

2,5,15

3, 2, 15

1,2,5

12,15,1

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the value of a[4]?

int a[5]={1,2,4,1,0}

1

10

0

Error

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of C program with arrays?

int main()

{

int a[3] = {20,30,40};

int b[3];

b=a;

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

}

Compiler Error

Output : 20

Output : 30

Output : 0

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

applications of a multidimensional array

Matrix-Multiplication

Minimum Spanning Tree

Finding connectivity between nodes

All the above

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?