Search Header Logo

C Pointer

Authored by Azrinna Muhamad

Other

University

Used 2+ times

C Pointer
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you declare a pointer to an integer in C?

int p;

int &p;

int *p;

int p*;

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is the output of the following code?

The memory address of x

10

The memory address of p

Garbage value

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will be the result of the following code?

5

10

Memory address of x

Compilation error

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is the output of the following code?

10

20

30

Compilation error

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can you pass a pointer to a function in C?

void function(int *ptr);

void function(int ptr);

void function(int &ptr);

void function(int ptr*);

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?