CPPS Quiz

CPPS Quiz

University

12 Qs

quiz-placeholder

Similar activities

MIND ZONE 2.2 [LEVEL 2]

MIND ZONE 2.2 [LEVEL 2]

University

10 Qs

Quiz3_DataStruct

Quiz3_DataStruct

University

10 Qs

Pointer dan Fungsi

Pointer dan Fungsi

University

14 Qs

Topic 4 Array

Topic 4 Array

University

10 Qs

Apuntadores C++

Apuntadores C++

University

11 Qs

Array

Array

University

11 Qs

CS1010 Lab 4

CS1010 Lab 4

University

10 Qs

2D Array and Strings in C

2D Array and Strings in C

University

16 Qs

CPPS Quiz

CPPS Quiz

Assessment

Quiz

Computers

University

Hard

Created by

Harsh Kate

Used 1+ times

FREE Resource

12 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

1. Which of these best describes an array?

a) A data structure that shows a hierarchical behavior

b) Container of objects of similar types

c) Arrays are immutable once initialised

d) Array is not a data structure

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

2. How do you initialize an array in C?

a) int arr[3] = (1,2,3);

b) int arr(3) = {1,2,3};

c) int arr[3] = {1,2,3};

d) int arr(3) = (1,2,3);

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

3) Choose a correct statement about C language arrays.

A) An array address is the address of first element of array itself

B) An array size must be declared if not initialized immediately

C) Array size is the sum of sizes of all elements of the array.

D) All the above


4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

4) What are the Types of Arrays.?


A) int, long, float, double


B) struct, enum


C) char


D) All the above


5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

5) An array Index starts with.?


A) -1


B) 0


C) 1


D) 2


6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

6) Choose a correct statement about C language arrays.


A) An array size can not changed once it is created.


B) Array element value can be changed any number of times


C) To access Nth element of an array students, use students[n-1] as the starting index is 0.


D) All the above


7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

7) What is the output of C Program.? int main() { int a[]; a[4] = {1,2,3,4}; printf("%d", a[0]); }


A) 1


B) 2


C) 4


D) Compiler error


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?