Array in C

Array in C

University

10 Qs

quiz-placeholder

Similar activities

Input, output and storage de

Input, output and storage de

8th Grade - Professional Development

14 Qs

Computer Architecture Unit 3

Computer Architecture Unit 3

University

15 Qs

BCA

BCA

University

10 Qs

Tin 8/1

Tin 8/1

KG - University

10 Qs

Assessment 08

Assessment 08

University

15 Qs

Prework Etapa 1 - Bogotá

Prework Etapa 1 - Bogotá

University

10 Qs

Ulangan harian 1 Algoritma dan Pemrograman

Ulangan harian 1 Algoritma dan Pemrograman

12th Grade - University

13 Qs

Microcontroller

Microcontroller

11th Grade - University

10 Qs

Array in C

Array in C

Assessment

Quiz

Computers

University

Practice Problem

Hard

Created by

Bhanu Pratap Rai

Used 417+ times

FREE Resource

AI

Enhance your content in a minute

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

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 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

45 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

2

4

Error

3.

MULTIPLE CHOICE QUESTION

45 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

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the output of C Program.?

int main()

{

char grade[] = {'A','B','C'}; printf("GRADE=%c, ", *grade); printf("GRADE=%d", grade);

}

GRADE=some address of array, GRADE=A

GRADE=A, GRADE=some address of array

GRADE=A, GRADE=A

Compiler error

5.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the output of C program.?

int main() {

char grade[] = {'A','B','C'}; printf("GRADE=%d, ", *grade); printf("GRADE=%d", grade[0]);

}

A A

65 A

65 65

None

6.

MULTIPLE CHOICE QUESTION

45 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

7.

MULTIPLE CHOICE QUESTION

45 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

Create a free account and access millions of resources

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

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?