Search Header Logo

functions

Authored by THAMARAI B

Computers

University

Used 1+ times

functions
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a function in C?

A block of code that performs a specific task

A data structure used to store values

A type of variable

A loop that repeats certain actions

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is the correct syntax to call a function in C?

call function_name;

function_name();

call function_name();

function_name[];

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you declare a function prototype in C?

function_name();

void function_name;

return_type function_name(parameter_list);

function_name(parameter_list)

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

#include <stdio.h>

void greet() {

printf("Hello, World!\n");

}

int main() {

greet();

return 0;

}

Hello, World!

Error

NULL

0

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

int

void

char

float

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following functions is not a standard library function in C?

A)
B)
C)
D)

printf()

scanf()

print()

strlen()

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you pass an argument to a function in C?

Using a variable

Using a pointer

Using a function call

Both A and B

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?

Discover more resources for Computers