C Programming Quiz for Grade 13

C Programming Quiz for Grade 13

University

20 Qs

quiz-placeholder

Similar activities

Chapter 5 Mid Term Quiz - Computer System -

Chapter 5 Mid Term Quiz - Computer System -

5th Grade - University

20 Qs

COA_QUIZ_UNIT I

COA_QUIZ_UNIT I

University

20 Qs

Saintek Campus Day 2020

Saintek Campus Day 2020

University

16 Qs

ASK T3 2.1 Kriptografi dalam Keselamatan Data

ASK T3 2.1 Kriptografi dalam Keselamatan Data

University

15 Qs

Algo Quiz

Algo Quiz

University

16 Qs

Evaluasi 2 (Mathematica-Phyton)

Evaluasi 2 (Mathematica-Phyton)

University

20 Qs

Round 2 for Preplacement Bootcamp

Round 2 for Preplacement Bootcamp

University

15 Qs

IT 101 - Quiz 3

IT 101 - Quiz 3

University

20 Qs

C Programming Quiz for Grade 13

C Programming Quiz for Grade 13

Assessment

Quiz

Computers

University

Practice Problem

Medium

Created by

NORAZIAHTULHIDAYU BINTI KAMARUDIN NORAZIAHTULHIDAYU BINTI KAMARUDIN

Used 2+ times

FREE Resource

AI

Enhance your content in a minute

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

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.

Access all questions and much more by creating a free account

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

Already have an account?