LAB-Array-String

LAB-Array-String

University

20 Qs

quiz-placeholder

Similar activities

2D Array and Strings in C

2D Array and Strings in C

University

16 Qs

Pointers in C

Pointers in C

University

24 Qs

UAS Logika dan Algoritma Pemrograman

UAS Logika dan Algoritma Pemrograman

1st Grade - University

15 Qs

Unit-2 Test-1

Unit-2 Test-1

University

20 Qs

Java Programming

Java Programming

University

20 Qs

EST102 : PROGRAMMING IN C TEST 1

EST102 : PROGRAMMING IN C TEST 1

University

20 Qs

Array Addresses 2024

Array Addresses 2024

University

20 Qs

BSIS 2-3- Quiz in ARRAY

BSIS 2-3- Quiz in ARRAY

University

20 Qs

LAB-Array-String

LAB-Array-String

Assessment

Quiz

Computers

University

Medium

Created by

Rishabh Tomar

Used 9+ times

FREE Resource

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you initialize an array in C?

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

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

int arr[3] = {1,2,3}

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

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of C Program.?

int main() {

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

int b[4] = {5,6,7,8};

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

}

1,5

2,6

0,0

Error

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of C program.?

int main()

{

float marks[3] = {90.5, 92.5, 96.5};

int a=0;

while(a<3)

{

printf("%.2f,", marks[a]); a++;

}

}

90.5 92.5 96.5

90.50 92.50 96.50

0.00 0.00 0.00

Compiler error

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of C Program.?

int main() {

int a[3] = {10,12,14};

a[1]=20;

int i=0;

while(i<3)

{ printf("%d ", a[i]);

i++; }

}

20 12 14

10 20 14

10 12 20

Error

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

8.Which of the following correctly accesses the seventh element stored in arr, an array with 100 elements?

arr[6]

arr[7]

arr{6}

arr{7}

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the minimum and maximum Indexes of this below array.?

int main()

{

int ary[9];

return 0;

}

-1, 8

0, 8

1,9

None of the above

7.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

How can I store the value 10 into the second row, first column of my array that I have declared as int numbers[10][10]?

int numbers[1][2] = 10;

numbers[1][2] = 10;

numbers[2][3] = 10;

numbers[1][0] = 10

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?