C Programing Quiz

C Programing Quiz

University

15 Qs

quiz-placeholder

Similar activities

PSC Quiz1

PSC Quiz1

University - Professional Development

20 Qs

Linux 3-4

Linux 3-4

University

20 Qs

SLG IPC Week 7

SLG IPC Week 7

University

13 Qs

Programming in C(1)

Programming in C(1)

University

20 Qs

На сколько ты знаешь C#

На сколько ты знаешь C#

University

10 Qs

PSP Module-4

PSP Module-4

University

20 Qs

OOP - Quiz

OOP - Quiz

University

15 Qs

2-D Arrays in Java

2-D Arrays in Java

University

20 Qs

C Programing Quiz

C Programing Quiz

Assessment

Quiz

Computers

University

Easy

Created by

Muntazim Alam

Used 1+ times

FREE Resource

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which loop guarantees that the loop body will be executed at least once?

  • A) for

  • B) while

  • C) do-while

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code?

int arr[5] = {1, 2, 3, 4, 5}; printf("%d", arr[3]);

  • A) 3

  • B) 4

  • C) 5

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following correctly defines a function with no return value and no parameters?

  • A) void func() {}

  • B) func(void) {}

  • C) int func() {}

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the following code snippet print?

int i; for (i = 0; i < 5; i++) { printf("%d ", i); }

  • A) 0 1 2 3 4

  • B) 1 2 3 4 5

  • C) 0 1 2 3 4 5

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct syntax to access the last element of an array arr with 10 elements?

  • A) arr[9]

  • B) arr[10]

  • C) arr[8]

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code?

int i = 10; while (i > 5) { i--; } printf("%d", i);

  • A) 6

  • B) 5

  • C) 10

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following statements is true about functions in C?

  • A) Functions cannot return arrays.

  • B) Functions can only have one parameter.

  • C) Functions cannot call other functions.

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?