C Programming Quiz for Grade 13

C Programming Quiz for Grade 13

University

20 Qs

quiz-placeholder

Similar activities

C Programming Quiz(session 1)

C Programming Quiz(session 1)

University

20 Qs

C programming Quiz

C programming Quiz

University

20 Qs

C Programming Quiz

C Programming Quiz

12th Grade - University

20 Qs

BASIC C PROGRAMMING QUIZ

BASIC C PROGRAMMING QUIZ

University

15 Qs

Structures and union

Structures and union

University

15 Qs

C Programming Assessment-1

C Programming Assessment-1

University

20 Qs

Unit-2 Test-2

Unit-2 Test-2

University

15 Qs

Unit-2 Test-1

Unit-2 Test-1

University

20 Qs

C Programming Quiz for Grade 13

C Programming Quiz for Grade 13

Assessment

Quiz

Computers

University

Medium

Created by

NORAZIAHTULHIDAYU BINTI KAMARUDIN NORAZIAHTULHIDAYU BINTI KAMARUDIN

Used 2+ times

FREE Resource

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is the correct syntax to declare a function in C that takes two integers as parameters and returns an integer?

int function(int a, int b);

int function(a, b);

function(int a, int b);

int function(int, int) = 0;

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the default return type of a function in C if not specified?

void

int

float

char

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which keyword is used to return a value from a function in C?

break

continue

return

exit

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code? ```c int add(int a, int b) { return a + b; } int main() { printf("%d", add(2, 3)); return 0; } ```

23

5

2

3

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is the correct way to declare a function that does not return any value?

void function();

int function();

function void();

function();

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code? ```c void printHello() { printf("Hello"); } int main() { printHello(); return 0; } ```

Hello

printHello

0

Error

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following statements about function prototypes in C is true?

Function prototypes are optional in C.

Function prototypes must be declared before their first use.

Function prototypes are only required for recursive functions.

Function prototypes are not allowed in C.

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?